data\cnc_clrmsgbuff

Clears the receive buffer or the transmit buffer.


PROTOTYPE

FWLIBAPI short WINAPI cnc_clrmsgbuff(unsigned short FlibHndl, short slct);


ARGUMENTS

Name Direction Description
FlibHndl in

Specify the library handle. See "Library handle" for details.

slct in

Buffer type

Select the buffer to be cleared.
0 : receive buffer
1 : transmit buffer

ERRORS

Code Description
EW_ATTRIB Data attribute error
Type of buffer(slct) is neither 0 nor 1.
EW_NOOPT No option
The OSI-Ethernet option, and the extended driver/library function are necessary.
EW_REJECT CNC execution denial(only Series 16/18, 16i/18i/21i)
OSI-Ethernet is initializing or restarting.

data\cnc_dschdir

  • DATA SERVER
  • Changing a current folder of the ATA card with DATA SERVER function.

  • DATA SERVER Host
  • Changing a current folder of host currentry connected with DATA SERVER function, and receive the filelist of a changed connection host.

  • Embedded Ethernet
  • Changing a current folder of connection host with an embedded Ethernet function, and receive the filelist of a changed connection host.


PROTOTYPE

FWLIBAPI short WINAPI cnc_dschdir(unsigned short FlibHndl, char *dev_name, char *dir, IN_DSFILE *ds_file_in, OUT_DSINFO *ds_info_out, OUT_DSFILE *ds_file_out);


ARGUMENTS

Name Direction Description
FlibHndl in

Specify the library handle. See "Library handle" for details.

dev_name in Specify the pointer of a variable area that stored device name to be specify. The device names to be specify are as follows:
DATA SERVER : "DATA_SV"
DATA SERVER Host : "DTSVR_HOST"
Embedded Ethernet : "EMB_ETHER"
dir in
  • DATA SERVER
  • Specify the pointer to a folder name to change.
    Maximum of 32 characters of ASCII character string including NULL, and place the NULL at the end.

  • DATA SERVER Host, Embedded Ethernet
  • Specify the pointer to a folder name to change.
    Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.

ds_file_in in (*Used only at time of DATA SERVER Host or Embedded Ethernet)
The pointer to IN_DSFILE structure which passes the setting value of file information taken out of a connection host.
IN_DSFILE structure is as follows:
typedef struct in_dsfile {
    char    path[256];  /* Standard File Name   */
    long    fnum;       /* Standard File Number */
    long    offset;     /* Offset               */
    short   req_num;    /* Request File Number  */
    short   size_type;  /* Size Type            */
    short   detail;     /* File Detail          */
    short   dummy;
} IN_DSFILE;
offset
The offset value from a head file of the file information to take out is set up.
req_num
The numder of files of file information to takeout is set up. req_num can set up to a maximum of 32.
detail
Read only the file name or read inclusive the file information is set up for the file information to take out.
0 : Read only the file name.
1 : Read inclusive the file information.
ds_info_out out (*Used only at time of DATA SERVER Host or Embedded Ethernet)
The pointer to OUT_DSINFO structure which stores the file information from a connection host.
OUT_DSINFO structure is as follows:
typedef struct out_dsinfo {
    short           type;       /* Type              */
    short           dummy;
    long            fnum;       /* Serial Number     */
    long            total;      /* Total File Number */
    unsigned long   remain_h;   /* Remains Capacity (Upper)*/
    unsigned long   remain_l;   /* Remains Capacity (Lower) */
    char            dir[256];   /* Current Folder    */
} OUT_DSINFO
fnum
The serial numbers from the head file of the file stored in the ds_file_out are returned.
In the case of a head file, 1 is returned.
total
The number of folders/the number of files registered into a connection host's current folder are returned.
ds_file_out out (*Used only at time of DATA SERVER Host or Embedded Ethernet)
The pointer to OUT_DSFILE structure which stores the file information received from the connection host.
The area that can be stored the number of data specified by the variable req_num of Argument ds_file_in is needed.
OUT_DSFILE structure is as follows:
typedef struct out_dsfile {
    short           year;       /* Last Edit Time */
    short           mon;        /* Last Edit Time */
    short           day;        /* Last Edit Time */
    short           hour;       /* Last Edit Time */
    short           min;        /* Last Edit Time */
    short           sec;        /* Last Edit Time */
    long            size;       /* Size         */
    unsigned long   attr;       /* Attribute    */
    char            file[36];   /* File Name    */
    char            info[128];  /* Infomation   */
} OUT_DSFILE
file
The file name for operation is returned.
Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end.
It becomes effective only when 1 is specified to be detail variable of argument ds_file_in.
info
The file name for a display or the string of file information is returned.
Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.
When 0 is specified to be a detail variable of argument ds_file_in,only the file name returns.
When 1 is specified to be a detail variable of argument ds_file_in,the file information returns.

ERRORS

Code Description
EW_NOOPT No option
In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
22 : The option board is nothing
24 : The DATA SERVER function is nothing.
26 : The ATA Card is nothing.
EW_BUSY Busy
DATA SERVER or embedded Ethernet is processing.
EW_LENGTH Data block length error
The Specification of req_num is wrong.
EW_NUMBER Data number error
The Specification of detail is wrong.
EW_DTSRVR DATA SERVER error or Embedded Ethernet error
In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    488 : Change of a directory went wrong.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    501 : Acquision of file information went wrong from the host computer.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dscopyfile

    Copying a file in the ATA card with DATA SERVER function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dscopyfile(unsigned short FlibHndl, char *srcfile, char *dstfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    srcfile in The pointer to the file name of a copied material is specified.
    Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated.

    dstfile in The pointer to the file name of a copy place is specified.
    The file of the same name as the file which already exists cannot be specified.
    Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated.


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_MODE CNC mode error
    CNC mode is not EDIT mode.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    491 : Change of a file name / folder name went wrong.
    497 : The file name / folder name specified after change already exist.

    data\cnc_dsftpcancel

    This function is used to cancel the following operetions.
    cnc_dsget_req()
    cnc_dsput_req()
    cnc_dsmget_req()
    cnc_dsmput_req()
    cnc_dslistget_req()
    cnc_dslistput_req()
    cnc_dslistdel_req()
    Result of stopping file transfer calls cnc_dsftpstat() function.

    * "Req." is declare the stop demands of a file transfer each FTP.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    It is necessary to get EW_OK or EW_REJECT or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsftpcancel(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_FUNC Execute the FTP functions on ahead.

    data\cnc_dsftpstat

    The execution result(EW_OK/EW_DTSRVR) of the following function can be taken out only at once.
    cnc_dsget_req()
    cnc_dsput_req()
    cnc_dsmget_req()
    cnc_dsmput_req()
    cnc_dslistget_req()
    cnc_dslistput_req()
    cnc_dslistdel_req()
    In addition, according to the state at the time of this function execution, completion status is as follows.

    * "Req." is declare start demand the file operation each FTP.
    "ret=" is declare the completion status when perfoming this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsftpstat(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_FUNC Function un-performing
    Please perform a FTP-related function beforehand.
    EW_REJECT Cancellation End
    FTP-related processing was canceled.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    464 : The ATA card is not formated.
    468 : Connection host is not found.
    472 : An error is in the form of a list file.
    473 : List-DEL went wrong.
    474 : The file specified by List_PUT does not exist.
    475 : List-GET went wrong.
    476 : Creation of a folder went wrong temporarily of alist file for week.
    477 : The file whith corresponds by MPUT does not exist.
    478 : There are too many files which corresponds by MGET.
    494 : The specified list file does not exist.
    497 : The file name / folder name specified after change already exist..
    500 : Opening of the list file failed.
    501 : Acquision of file information went wrong from the host computer.
    502 : PUT went wrong.
    - The file transfer was rejected by the FTP server.(There was no access right to the folder, or the folder of this name existed. etc.)
    - The communication error occurred in the FTP server.
    503 : GET went wrong.
    - The file did not exist.
    - The file transfer was rejected by the FTP server.(There was no access right to the file which wanted to get. etc.)
    - The TV check error was detected.
    - The error occurred by writing in the ATA card at GET.(excess of number of files, exceeds size of the maximum file, exceeds capacity of ATA card, defect of ATA card.)
    - The communication error occurred in the FTP server.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dsget_req

    Directs to GET a file to from a host computer at DATA SERVER.
    When this function is normally ended, it starts getting files from host computer.
    About the result which GET the file, it takes out with the cnc_dsftpstat() function.
    Don't use DATA SERVER function (except for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK or EW_DTSRVR of completion status with a cnc_dsftpstat().

    * "Req." is declare start demand the file GET.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsget_req(unsigned short FlibHndl, char *net_file, char *nc_file, short binary);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in Specify the pointer to the file name in the host computer.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • The maximum length of the file name is 128 including 'NULL'.
    • It is impossible to specify the path.
    • The lowercase can be used.
    • The wild-card('*','?') cannot be used.
    nc_file in Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be NULL.
    • Maximum of 33 characters of the the file is including NULL.
    binary in Specify whether binary data transfer is performed.
    0 : It does not considers as binary data transmission.
    1 : It considers as binary data transmission.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_NUMBER Data number error
    Specification of binary is wrong.

    data\cnc_dslistdel_req

    According to the list which exists in the ATA card of DATA SERVER functon, two or more files are deleted.
    When this function carries out a normal end, it is shown that List-DEL of the file to a host computer was started.
    About the result which List-DEL the file, it takes out with the cnc_dsftpstat().
    Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().

    * "Req." is declare start demand the file List-DEL.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dslistdel_req(unsigned short FlibHndl, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file in A list file name to delete from the ATA card of DATA SERVER function is specfied.
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Maximum of 33 characters of the the file is including NULL.
    • It is impossible to specify the path.
    • The lowercase can be used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dslistget_req

    According to the list file which exists in the connection host of DATA SERVER function, the file transfer of two or more files is continuously carried out to an ATA card.
    When this function carries out a normal end, it is shown that List-GET of the file from a host computer was started.
    Please take out with cnc_dsftpstat() about the result which List-GET the file.
    Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().

    * "Req." is declare start demand the file List-GET.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dslistget_req(unsigned short FlibHndl, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file in A file name to carry out a file transfer from the ATA card of DATA SERVER function is specfied.
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Maximum of 33 characters of the the file is including NULL.
    • It is impossible to specify the path.
    • The lowercase can be used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dslistput_req

    According to the list file which exists in the ATA card of DATA SERVER function ,the file transfer of two or more files is carried out to a connection host.
    When this function carries out a normal end, it is shown that List-PUT of the file to a host computer was started.
    About the result which List-PUT the file, it takes out with the cnc_dsftpstat().
    Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().



    * "Req." is declare start demand the file List-PUT.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dslistput_req(unsigned short FlibHndl, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file in A list file name to carry out a file transfer from the ATA card of DATA SERVER function is specfied.
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Maximum of 33 characters of the the file is including NULL.
    • It is impossible to specify the path.
    • The lowercase can be used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dsmget_req

    It directs to MGET a file from a host computer to DATA SERVER.
    A wild card can be used for a file name and the file transfer of two or more files whose file names correspond can be carryed out continuously.
    When this function carries out a normal end, it is shown that MGET of the file from a host computer was started.
    Please take out with cnc_dsftpstat() about the result which MGET the file.

    Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().

    * "Req." is declare start demand the file MGET.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsmget_req(unsigned short FlibHndl, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file in A file name to carry out a file transfer from the connection host of DATA SERVER function is specfied.
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Maximum of 33 characters of the the file is including NULL.
    • It is impossible to specify the path.
    • The lowercase can be used.
    • The wild-card('*','?') is used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dsmkdir

    • DATA SERVER
    • A new folder is created to the current folder of the ATA card of DATA SERVER function.

    • DATA SERVER Host
    • A new folder is created to the current folder of the present connection host of DATA SERVER function.

    • Embedded Ethernet
    • A new folder is created to the current folder of the present connection host of an embedded Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsmkdir(unsigned short FlibHndl, char *dev_name, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored is specified.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"
    dir in
    • DATA SERVER
    • The pointer to the newly created folder name is specified.
      The folder of the same name as the folder and file which already exist cannot be created.
      Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end.

    • DATA SERVER Host, Embedded Ethernet
    • The pointer to the newly created folder name is specified.
      The folder of the same name as the folder and file which already exist cannot be created.
      Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.

      Only the newly created folder name is specified(path specification is impossible).


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_DATA Data error
    The Specification of dev_name is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    489 : Creation of a folder went wrong.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    489 : Creation of a folder went wrong.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dsmput_req

    It directs to MPUT a file to a host computer from DATA SERVER.
    A wild card can be used for a file name and the file transfer of two or more files whose file names correspond can be carryed out continuously.

    When this function carries out a normal end, it is shown that MPUT of the file to a host computer is started.
    Please take out with cnc_dsftpstat() about the result which MPUT the file.

    Don't use DATA SERVER function (expect for DNC operetion) by the CNC side after this function carries out a normal end until it takes out EW_OK of completion status, or EW_DTSRVR with cnc_dsftpstat().

    * "Req." is declare start demand the file MPUT.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsmput_req(unsigned short FlibHndl, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file in Specify a file name to transfer a file from the ATA card of DATA SERVER function.
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Maximum of 33 characters of the the file is including NULL.
    • It is impossible to specify the path.
    • The lowercase can be used.
    • The wild-card('*','?') is used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dsput_req

    Directs to PUT a file to a host computer to DATA SERVER.
    When this function is normally ended, it starts putting files from host computer.
    FOR the result which PUT the file, it takes out with the cnc_dsftpstat().
    Don't use DATA SERVER function (except for DNC operetion) by the CNC side after this function carries out a normal end until it receives EW_OK or EW_DTSRVR of completion status with a cnc_dsftpstat().

    * "Req." is declare start demand the file PUT.
    "ret=" is declare the completion status when perfoming cnc_dsftpstat() function.
    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dsftpstat() when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsput_req(unsigned short FlibHndl, char *net_file, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in Specify the pointer to the file name in the host computer.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • The maximum length of the file name is 128 including 'NULL'.
    • It is impossible to specify the path.
    • The lowercase can be used.
    nc_file in Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • Maximum of 33 characters of the the file is including NULL.
    • The wild-card('*','?') cannot be used.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.

    data\cnc_dsremove

    • DATA SERVER
    • The file in the current folder of the ATA card of DATA SERVER function delete.

    • DATA SERVER Host
    • The file in the current folder of the present connection host of DATA SERVER function delete.

    • Embedded Ethernet
    • The file in the current folder of the present connection host of an embedded Ethernet function delete.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsremove(unsigned short FlibHndl, char *dev_name, char *file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored specify.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"
    file in
    • DATA SERVER
    • The pointer of the variable area where the device name to specify is stored specify.
      Maximum of 33 characters of ASCII character string including NULL,and place the NULL at the end.
      The pointer of the variable area where the device name to specify is stored specify.
      The specification which used the wild card('*','?')is also possible.
      However, when '*' is used, the character after '*' cannot be specified.
      (Example:The specification "12*4" cannot be performed.)

    • DATA SERVER Host,embedded Ethernet
    • The pointer to the delete file name is specified. Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.
      Only the folder name to delete is specified(path specification is not available).


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_DATA Data error
    The Specification of dev_name is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    505 : Deletion of a file wrong.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    505 : Deletion of a file wrong.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dsrename

    • DATA SERVER
    • Changing the file or folder name which exist in the current folder of the ATA card of DATA SERVER function.

    • DATA SERVER Host
    • Changing the file or folder name which exist in the current folder of the present connection host of DATA SERVER function.

    • Embedded Ethernet
    • Changing the file or folder name which exist in the current folder of the present connection host of an embedded Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsrename(unsigned short FlibHndl, char *dev_name, char *src_name, char *dst_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored specify.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"
    src_file in
    • DATA SERVER
    • The folrder or filename before change specify.
      Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated.

    • DATA SERVER Host, Embedded Ethernet
    • Specify the only the folrder or filename before change.
      Maximum of 128 characters of ASCII character string including NULL,the string must be NULL terminated.
    dst_file in
    • DATA SERVER
    • Specify the only the folder or filename after change. Maximum of 33 characters of ASCII character string including NULL,the string must be NULL terminated.
      It cannot change into the same name as the folder and and file which alreadty exist.

    • DATA SERVER Host, Embedded Ethernet
    • Specify the only the folder or filename after change. Maximum of 128 characters of ASCII character string including NULL,the string must be NULL terminated.
      It cannot change into the same name as the folder and and file which alreadty exist.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_DATA Data error
    Specification of dev_name is inaccuracy.
    EW_DTSRVR DATA SERVER error or Embedded Ethernet error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    491 : Change of a file name / folder name went wrong.
    497 : The ATA card is not formated.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    491 : Change of a file name / folder name went wrong.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dsrmdir

    • DATA SERVER
    • The folder in the current folder of the ATA card of DATA SERVER function delete.

    • DATA SERVER Host
    • The folder in the current folder of the present connection host of DATA SERVER function delete.

    • Embedded Ethernet
    • The folder in the current folder of the present connection host of an embedded Ethernet function delete.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dsrmdir(unsigned short FlibHndl, char *dev_name, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored specify.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"
    dir in
    • DATA SERVER
    • The pointer to the delete folder name is specify.
      Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end.

    • DATA SERVER Host, Embedded Ethernet
    • The pointer to the delete folder name is specify.
      Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.

      Only the folder name to delete is specified(path specification is impossible).


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_DATA Data error
    The Specification of dev_name is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    487 : Deletion of a folder went wrong.
  • DATA SERVER Host
  • 468 : Connection host is not found.
    487 : Deletion of a folder went wrong.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_dtsvchkdsk

    Checks the hard disk on the DATA SERVER whether there is an error sector etc. or not.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvchkdsk(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvcnclupdn

    Cancels the following if it is being executed.

    - Download from DATA SERVER to CNC
    - Upload from CNC to DATA SERVER


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvcnclupdn(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Upload/download is not executed
    - Upload/download between DATA SERVER and CNC is not executed now.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvdelete

    Deletes the file in the DATA SERVER.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvdelete(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in

    Specify the pointer of the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:

    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is regarded as existing in the directory "\PROG" of the DATA SERVER in case of the DATA SERVER board(10BASE-5), or in the directory "\NCDATA" of the DATA SERVER in case of the DATA SERVER board(10BASE-T).)
    • The wild-card('*','?') can be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    (The unexecution of cnc_dtsvftpstat is included.)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvdownload

    Orders the CNC to download the file from the DATA SERVER.
    Therefore, normal termination of this function shows that downloading the file from the DATA SERVER has been started.
    The result of downloading file must be got by cnc_dtsvupdnstat.

    Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvupdnstat after this function was finished.

      * "Req." shows start request for download by this function.
      * "ret=" is the completion status when cnc_dtsvupdnstat is done.

    Throughout the prohibition term, the completion status of the following function is EW_BUSY.
    cnc_dwnstart
    cnc_vrfstart
    cnc_dncstart
    cnc_delete
    cnc_delall
    cnc_search
    cnc_dtsvdownload
    cnc_dtsvupload

    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvupdnstat when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvdownload(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the file name in the DATA SERVER for download.
    Specify as follows using ASCII code.

    "O" + <4 figures> + "NULL"


    ERRORS

    Code Description
    EW_BUSY Busy
    - download/upload function has been executed on CNC side. Try again.
    (The unexecution of cnc_dtsvupdnstat is included.)
    - alarm(PS000, PS101) in CNC side (only Series 16/18, 16i/18i/21i, 0i)
    Reset the alarm on CNC.
    - I/O channel number of CNC doesn't indicate the DATA SERVER.
    Set I/O channel number as the DATA SERVER.
    * Series 15
    Param.No.0020=14, 0022=14
    * Series 16/18, 16i/18i/21i, 0i
    Param.No.0020=5
    - background edit processing(Series 15/16/18, 16i/18i/21i, 0i) or MDI mode(Series 16/18, 16i/18i/21i, 0i) in CNC side
    Terminate background edit processing or change mode to any mode except MDI in CNC side.
    * In case of Series 15 and Param.No.2217#5 =0, EW_BUSY isn't returned and execution is delayed until B.G. edit is terminated.
    EW_NUMBER File name(nc_file[]) is wrong.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    CNC parameter error (only Series 16/18, 16i/18i/21i, 0i)

    - Set param.No.0900#0 to 0.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvftpget

    Orders the DATA SERVER to get file from the host computer.
    Therefore, normal termination of this function shows that getting the file from the host computer has been started.
    The result of getting file must be got by cnc_dtsvftpstat.

    Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvftpstat after this function was finished.

      * "Req." shows the start request for getting file by this function.
      * "ret=" is the completion status when cnc_dtsvftpstat is done.

    Throughout the prohibition term, the completion status of the following function is EW_BUSY.

    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvftpstat when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvftpget(unsigned short FlibHndl, char *net_file,char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the file name in the host computer.
    The specification of the file name of the host computer is as follows:

    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • The maximum length of the file name is 256 including 'NULL'.
    • It is impossible to specify the path.
    • (Specify the path by using cnc_dtsvwrset.)
    • The lowercase can be used.
    • The wild-card('*','?') cannot be used.
    nc_file in

    Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:

    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is made in the directory "\PROG" of the DATA SERVER in case of the DATA SERVER board (10BASE-5), or in the directory "\NCDATA" of the DATA SERVER in case of the DATA SERVER board(10BASE-T).)
    • The wild-card('*','?') cannot be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvftpput

    Orders the DATA SERVER to put file to the host computer.
    Therefore, normal termination of this function shows that putting the file to the host computer has been started.
    The result of putting file must be got by cnc_dtsvftpstat.

    Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvftpstat after this function had been finished.

      * "Req." shows the start request for putting file by this function.
      * "ret=" is the completion status when cnc_dtsvftpstat is done.

    Throughout the prohibition term, the completion status of the following function is EW_BUSY.

    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvftpstat when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvftpput(unsigned short FlibHndl, char *net_file,char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the file name in the host computer.
    The specification of the file name of the host computer is as follows:

    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • The maximum length of the file name is 256 including 'NULL'.
    • It is impossible to specify the path. (Specify the path by using cnc_dtsvwrset.)
    • The lowercase can be used.
    • The wild-card('*','?') cannot be used.
    nc_file in

    Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:

    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is regarded as existing in the directory "\PROG" of the DATA SERVER in case of the DATA SERVER board(10BASE-5), or in the directory "\NCDATA" of the DATA SERVER in case of the DATA SERVER board(10BASE-T).)
    • The wild-card('*','?') cannot be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvftpstat

    The execution result of cnc_dtsvftpput, cnc_dtsvftpget function can be got only once.
    The completion status is as follows when this function is executed.

      * "Req." shows the start request for putting/getting file by cnc_dtsvftpput / cnc_dtsvftpget function.
      * "ret=" is the completion status when this function is done.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvftpstat(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    EW_FUNC Function is not executed
    - "PUT/GET" of file is not executed Execute either cnc_dtsvftpput or cnc_dtsvftpget beforehand.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvgetdncpg

    Gets the file name for DNC operation in the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvgetdncpg(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file out
    Specify the pointer to the file name for DNC operation.
    The file name is as follows.
    "O" + <4 figures> + "NULL"

    ERRORS

    Code Description
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvgetmode

    Gets the current mode of the DATA SERVER(storage mode/buffer mode).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvgetmode(unsigned short FlibHndl,short *dsmode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsmode out Pointer to the mode of the DATA SERVER.
    0 : storage mode
    1 : buffer mode

    ERRORS

    Code Description
    EW_FUNC Unavailable
    - This function is not available for the DATA SERVER board(10BASE-T).
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvhdformat

    Formats the hard disk on the DATA SERVER.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvhdformat(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing. (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvmntinfo

    Reads the following maintenance information for the DATA SERVER.
    This is the function for purposes of maintenance.

    - Count which the buffer between the DATA SERVER and CNC has become empty during downloading CNC program from the DATA SERVER to CNC
    - Total size downloaded from the DATA SERVER to CNC
    - Read pointer used by the DATA SERVER
    - Write pointer used by the DATA SERVER


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvmntinfo(unsigned short FlibHndl,ODBDSMNT *minfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    minfo out Pointer to the ODBDSMNT structure including the maintenance information for the DATA SERVER.

    The ODBDSMNT structure is as follows.

    typedef struct odbdsmnt {
        long empty_cnt ;
        long total_size ;
        long read_ptr ;
        long write_ptr ;
    } ODBDSMNT ;
    
    empty_cnt
    Count which shows how many times the buffer between the DATA SERVER and CNC has become empty during downloading CNC program from the DATA SERVER to CNC is stored.
    total_size
    Total size downloaded from the DATA SERVER to CNC is stored.
    read_ptr
    Read pointer used by the DATA SERVER is stored.
    write_ptr
    Write pointer used by the DATA SERVER is stored.

    ERRORS

    Code Description
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvrdcram

    Reads the contents of the interface buffer for the DATA SERVER.
    This is the function for purposes of maintenance.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvrdcram(unsigned short FlibHndl,long addr,long *size,char *cram);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    addr in Start address
    Specify the offset address from top of the interface buffer.
    (0x00000000 <--> 0x0000FFFF)
    size in/out Pointer to the read out size.
    Specify the number of byte of read out.(1 <--> 65536)
    The size which has been read actually is stored.
    cram out Pointer to the contents of the interface buffer for the DATA SERVER.
    The area more than above size is necessary.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    - Size is out of range(1 <--> 65536).
    EW_NUMBER Start address error
    - Start address is out of range(0x00000000 <--> 0x0000FFFF).
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvrderrmsg

    Reads the message of the error occurred in the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvrderrmsg(unsigned short FlibHndl,short slct,char *errmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct in Selection of message
    Specify the following message.
    0 : error message of DATA SERVER
    1 : system error message of DATA SERVER
    errmsg in Pointer to the error message.
    The maximum length of the message is 481 byte including 'NULL'.
    The error message is stored in accordance with a screen image of 12 lines * 40 characters, and the last character is 'NULL'.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    - This function is not available for the DATA SERVER board(10BASE-T).
    EW_ATTRIB Message selection error
    - The selection of message is neither 0 nor 1.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    data\cnc_dtsvrdfile

    Transfers file from DATA SERVER to hard disk on personal computer.
    This function is effective for the DATA SERVER board(10BASE-T), and 16i/18i/21i, 0i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvrdfile(unsigned short FlibHndl,char *dtsv_file,char *pc_file,short chnl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dtsv_file in Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is regarded as existing in the directory "\NCDATA" of the DATA SERVER.)
    • The wild-card('*','?') can be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL

    pc_file in Specify the pointer to the file name in the hard disk on personal computer.
    The specification of the file name of the hard disk on personal computer is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Specify with the pathname.
    • The wild-card('*','?') cannot be used.
    chnl in Specify Task channel of the DATA SERVER.
    DATA SERVER has 8 Task channels. The channel that a parsonal computer uses for transferring file is specified by this "chnl". Available number is from 11 to 17.

    DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE). In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.

  • User's number
  • 0 : Invalid 11 : Personal computer function No.1 21 : PMC
    1 : CNC No.1 12 : Personal computer function No.2 31 : C-EXE
    2 : CNC No.2 13 : Personal computer function No.3
    3 : CNC No.3 14 : Personal computer function No.4
    4 : CNC No.4 15 : Personal computer function No.5
    5 : CNC No.5 16 : Personal computer function No.6
    6 : CNC No.6 17 : Personal computer function No.7
    7 : CNC No.7
    8 : CNC No.8

  • CNC parameters
  • No.941 : For channel No.1
    No.942 : For channel No.2
    No.943 : For channel No.3
    No.944 : For channel No.4
    No.945 : For channel No.5
    No.946 : For Channel No.6
    No.947 : For Channel No.7
    No.948 : For Channel No.8

    NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1).
    After using this function, the mode of the channel used by this function is changed to storage mode.

    ERRORS

    Code Description
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_DATA File name(pc_file[]) is wrong, File open error, File read error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : File(pc_file[]) open error
    3 : File(pc_file[]) write error
    EW_PARAM Task channel setting error in NC parameter
    - Setting user's number 11-17 for personal computer function to NC parameters(No.941-948) is necessary.
    EW_NUMBER Task channel setting error in this function
    - Setting user's number 11-17 for personal computer function to argument"chnl" is necessary.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(10BASE-T) is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\cnc_dtsvrdpgdir

    Reads the directory information in the DATA SERVER.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvrdpgdir(unsigned short FlibHndl, char *nc_file,short number,ODBDSDIR *dsdir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the first file name to be read.
    If 'NULL'(first character is 'NULL') is specified, it is interpreted that the first file is specified.
    If the specified file does not exist, it is interpreted that the next file in alphabetical order which exists in the directory is specified.
    However, if the specified file is backward than the last file, it is interpreted that the last file is specified.

    <ex.> It is assumed that 15 files which consists of "O0001"<-->"O0010" and "O0016"<-->"O0020" are registered in the DATA SERVER. In this case, if settings are as follows, the information of 3 files starting from "O0016" is got.

    nc_file = "O0013", number = 3

    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is regarded as existing in the directory "\PROG" of the DATA SERVER in case of the DATA SERVER board(10BASE-5), or in the directory "\NCDATA" of the DATA SERVER in case of the DATA SERVER board(10BASE-T).)
    • The wild-card('*','?') cannot be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL

    number in

    Specify the number of directory information.

    effective range : 1 <= number <= 32

    dsdir out

    Pointer to the ODBDSDIR structure including the directory information in the DATA SERVER.
    The ODBDSDIR structure is as follows.

    typedef struct odbdsdir {
        long    file_num ;  /* number of files in hard disk */
        long    remainder ; /* remainder capacity of hard disk */
        short   data_num ;  /* number of directory */
        struct {
            char    file_name[16] ; /* file name */
            char    comment[64] ;   /* comment */
            long    size ;          /* file size */
            char    date[16] ;      /* update date */
        } data[32] ;
    } ODBDSDIR ;
    
    file_num
    Number of files registered in hard disk of the DATA SERVER

    remainder
    The remainder capacity of hard disk of the DATA SERVER(byte)

    data_num
    Number of directory information

    file_name
    File name

    comment
    Comment
    The comment just behind the file name is stored by ASCII code. The character string is terminated by 'NULL' and 64 characters or less are stored including 'NULL'. However, LF is not included.

    size
    File size(byte)

    date
    Updated date of file
    This is stored by the ASCII character string of following form. The character string is terminated by 'NULL'.



    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    (The unexecution of cnc_dtsvftpstat is included.)
    EW_NUMBER Data number error
    The number of directory to read is wrong.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvrdset

    Reads the setting data in the DATA SERVER.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvrdset(unsigned short FlibHndl,IODBDSSET *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    set out Pointer to the IODBDSSET structure including the setting data in the DATA SERVER.

    The IODBDSSET structure is as follows.

    typedef struct iodbdsset {
            char host_ip[16] ;
            char host_uname[32] ;
            char host_passwd[32] ;
            char host_dir[128] ;
            char dtsv_mac[13] ;
            char dtsv_ip[16] ;
            char dtsv_mask[16] ;
    } IODBDSSET ;
    
    host_ip[16]
    Current IP address of host computer is stored by ASCII code(max. 16 characters including 'NULL').
    host_uname[32]
    Current user name of host computer, which is used to login by means of 'FTP', is stored by ASCII code(max. 32 characters including 'NULL').
    host_passwd[32]
    (not used)
    host_dir[128]
    Current directory of host computer, which is accessed by DATA SERVER, is stored by ASCII code(max. 128 characters including 'NULL').
    dtsv_mac[13]
    Current MAC address of DATA SERVER board is stored by ASCII code(max. 13 characters including 'NULL').
    dtsv_ip[16]
    Current IP address of DATA SERVER board is stored by ASCII code (max. 16 characters including 'NULL').
    dtsv_mask[16]
    Mask address of current IP address of network is stored by ASCII code(max. 16 characters including 'NULL').

    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_FUNC Unavailable
    - This function is not available for the DATA SERVER board (10BASE-T).
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvsavecram

    Saves the contents of the interface buffer for the DATA SERVER to the file by the name of "COMMON.RAM" in the hard disk of the DATA SERVER.
    This is the function for purposes of maintenance.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvsavecram(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    EW_FUNC Unavailable
    - This function is not available for the dataserver board(10BASE-T).
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvsetdncpg

    Sets the file name for DNC operation in the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvsetdncpg(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the file name in the DATA SERVER.
    Specify as follows using ASCII code.
    "O" + <4 figures> + "NULL"

    ERRORS

    Code Description
    EW_BUSY Busy
    - alarm(PS000, PS101) in CNC side(only Series 16/18, 16i/18i/21i, 0)
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    CNC parameter error(only Series 16/18, 16i/18i/21i, 0i)

    - Set param.No.0900#0 to 0.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvsetmode

    Sets the current mode of the DATA SERVER(storage mode/buffer mode).

    If the mode of the DATA SERVER is changed, all the data in hard disk of the DATA SERVER is erased.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvsetmode(unsigned short FlibHndl,short dsmode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsmode in Specify the mode of the DATA SERVER.
    0 : storage mode
    1 : buffer mode

    ERRORS

    Code Description
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_FUNC Unavailable
    - This function is not available for the DATA SERVER board(10BASE-T).
    EW_DATA Mode indication error
    - The mode indication of DATA SERVER is neither 0 nor 1.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    CNC parameter error(only Series 16/18, 16i/18i/21i)

    - Set param.No.0900#0 to 0.

    data\cnc_dtsvupdnstat

    The execution result of cnc_dtsvdownload, cnc_dtsvupload function can be got only once.
    The completion status is as follows when this function is executed.

      * "Req." shows the start request for download/upload the file by cnc_dtsvdownload/cnc_dtsvupload functions.
      * "ret=" is the completion status when this function is done.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvupdnstat(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    - As 'RESET or STOP' was pushed, upload/download was forced to cancel.
    EW_BUSY Busy
    - As upload/download is being executed, try again.
    EW_FUNC Function is not executed
    - upload/download is not executed Execute either cnc_dtsvdownload or cnc_dtsvupload beforehand.
    EW_DATA Data error
    - file has already existed
    The file which replaced by upload/download is write-protected.
    - file does not exist
    The indicated file does not exist.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_PROT - Protection KEY(DI/KEY3) is off.
    - CNC parameter is a state of write-protection.(O8000-/O9000- protection, encoding).
    EW_OVRFLOW Memory overflow
    p - Because free area in CNC memory runs short, make enough free area.
    - The total number of program exceeded the limit of registrable programs in CNC.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvupload

    Orders the CNC to upload the file to the DATA SERVER.
    Therefore, normal termination of this function shows that uploading the file to the DATA SERVER has been started.
    The result of uploading file must be got by cnc_dtsvupdnstat.

    Don't use the data sever function(except DNC operation) at the CNC side until either EW_OK or EW_DTSRVR as the completion status is got by cnc_dtsvupdnstat after this function was finished.

      * "Req." shows start request for upload by this function.
      * "ret=" is the completion status when cnc_dtsvupdnstat is done.

    Throughout the prohibition term, the completion status of the following function is EW_BUSY.
    cnc_dwnstart
    cnc_vrfstart
    cnc_dncstart
    cnc_delete
    cnc_delall
    cnc_search
    cnc_dtsvdownload
    cnc_dtsvupload

    Therefore, it is necessary to get either EW_OK or EW_DTSRVR as the completion status by cnc_dtsvupdnstat when this function was executed successfully.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvupload(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the file name in the DATA SERVER for upload.
    Specify as follows using ASCII code.
    "O" + <4 figures> + "NULL"

    ERRORS

    Code Description
    EW_BUSY Busy
    - download/upload function has been executed on CNC side. Try again.
    (The unexecution of cnc_dtsvupdnstat is included.)
    - alarm(PS000, PS101) in CNC side (only Series 16/18, 16i/18i/21i, 0i)
    Reset the alarm on CNC.
    - I/O channel number of CNC doesn't indicate the DATA SERVER.
    Set I/O channel number as the DATA SERVER.
    * Series 15
    Param.No.0020=14, 0022=14
    * Series 16/18, 16i/18i/21i, 0i
    Param.No.0020=5
    - background edit processing(Series 15/16/18, 16i/18i/21i, 0i) or MDI mode(Series 16/18, 16i/18i/21i, 0i) in CNC side
    Terminate background edit processing or change mode to any mode except MDI in CNC side.
    * In case of Series 15 and Param.No.2217#5 =0, EW_BUSY isn't returned and execution is delayed until B.G. edit is terminated.
    EW_NUMBER File name(nc_file[]) is wrong.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.

    CNC parameter error(only Series 16/18, 16i/18i/21i, 0i)

    - Set param.No.0900#0 to 0.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_dtsvwrfile

    Transfers file from hard disk on personal computer to DATA SERVER.
    This function is effective for the DATA SERVER board(10BASE-T), and 16i/18i/21i, 0i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvwrfile(unsigned short FlibHndl,char *pc_file,char *dtsv_file,short chnl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pc_file in Specify the pointer to the file name in the hard disk on personal computer.

    The specification of the file name of the hard disk on personal computer is as follows:

    - Use ASCII code.
    - The last character of the file name must be 'NULL'.
    - Specify with the pathname.
    - The wild-card('*','?') cannot be used.
    dtsv_file in Specify the pointer to the file name in the DATA SERVER.

    The specification of the file name of the DATA SERVER is as follows:

    - Use ASCII code.
    - The last character of the file name must be 'NULL'.
    - It is impossible to specify the path.
    (The file is made in the directory "\NCDATA" of the DATA SERVER)
    - The wild-card('*','?') cannot be used.
    Specify the MS-DOS form.
    <ex.> "XXXXXXXX.XXX" + "NULL"

    However, the "O" number is managed as a file name now.

    <ex.> "O0001" + "NULL"
    chnl in Specify Task channel of the DATA SERVER.

    DATA SERVER has 8 Task channels. The channel that a parsonal computer uses for transferring a file is specified by this "chnl". Available number is from 11 to 17.

    DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE). In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.

  • User's number
  • 0 : Invalid 11 : Personal computer function No.1 21 : PMC
    1 : CNC No.1 12 : Personal computer function No.2 31 : C-EXE
    2 : CNC No.2 13 : Personal computer function No.3
    3 : CNC No.3 14 : Personal computer function No.4
    4 : CNC No.4 15 : Personal computer function No.5
    5 : CNC No.5 16 : Personal computer function No.6
    6 : CNC No.6 17 : Personal computer function No.7
    7 : CNC No.7
    8 : CNC No.8

  • CNC parameters
  • No.941 : For channel No.1
    No.942 : For channel No.2
    No.943 : For channel No.3
    No.944 : For channel No.4
    No.945 : For channel No.5
    No.946 : For Channel No.6
    No.947 : For Channel No.7
    No.948 : For Channel No.8

    NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1).
    After using this function, the mode of the channel used by this function is changed to storage mode.

    ERRORS

    Code Description
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_DATA File name(pc_file[]) is wrong, File open error, File read error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : File(pc_file[]) open error
    2 : File(pc_file[]) read error
    EW_PARAM Task channel setting error in NC parameter
    - Setting user's number 11-17 for personal computer function to NC parameters(No.941-948) is necessary.
    EW_NUMBER Task channel setting error in this function
    - Setting user's number 11-17 for personal computer function to argument"chnl" is necessary.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(10BASE-T) is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\cnc_dtsvwrset

    Writes the setting data in the DATA SERVER.

    If this function is executed while cnc_dtsvftpput or cnc_dtsvftpget is executing(until the completion status is got by cnc_dtsvftpstat), EW_BUSY is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dtsvwrset(unsigned short FlibHndl,IODBDSSET *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    set in Pointer to the IODBDSSET structure including the setting data in the DATA SERVER.

    The IODBDSSET structure is as follows.

    typedef struct iodbdsset {
            char host_ip[16] ;
            char host_uname[32] ;
            char host_passwd[32] ;
            char host_dir[128] ;
            char dtsv_mac[13] ;
            char dtsv_ip[16] ;
            char dtsv_mask[16] ;
    } IODBDSSET ;
    
    host_ip[16]
    Specify the IP address of host computer by ASCII code(max. 16 characters including 'NULL').
    host_uname[32]
    Specify the user name of host computer, which is used to login by means of 'FTP', by ASCII code(max. 32 characters including 'NULL').
    host_passwd[32]
    Specify the password for above user name by ASCII code(max. 32 characters including 'NULL').
    host_dir[128]
    Specify the directory of host computer, which is accessed by DATA SERVER, by ASCII code(max. 128 characters including 'NULL').
    dtsv_mac[13]
    Specify the MAC address of DATA SERVER board by ASCII code(max. 13 characters including 'NULL').
    dtsv_ip[16]
    Specify the IP address of DATA SERVER board by ASCII code (max. 16 characters including 'NULL').
    dtsv_mask[16]
    Specify the MASK address of the IP address of the network by ASCII code(max. 16 characters including 'NULL').
    * The last character of above each string must be 'NULL'. If not, the behavior of this function isn't guaranteed.
    * Above MAC address, IP address and MASK address do not take effect until the power turns off and on.

    ERRORS

    Code Description
    EW_BUSY Busy
    Try again because DATA SERVER is processing.
    (There is a possibility of forgetting to call cnc_dtsvftpstat function.)
    EW_FUNC Unavailable
    - This function is not available for the DATA SERVER board(10BASE-T).
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(hardware) is necessary.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 <--> 498 : DATA SERVER error
    499 : DATA SERVER system error

    data\cnc_rdcomlogmsg

    Reads logging message for DNC2.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcomlogmsg(unsigned short FlibHndl, char *logmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    logmsg out

    Following three types of logging messages are returned.
    Each logging messages is separated by a control MODEL dependent delimiting character and terminated with NULL character.

    <CCCC> : CCCC Command part of datagram
    <NNNN0Xeeee> : NNNN Negative response (Command part of datagram)
    eeee Error code
    <Ennn0Xssdd> : Ennn Error code of data link layer
    ss Error sub-code (matrix status of data link layer)
    dd Error sub-code (Error data)
    • Series 15
    • Maximum 500 characters including NULL are returned.
      Delimiting character is ASCII "|".

    • Series 16/18, 16i/18i/21i
    • Maximum 440 characters including NULL are returned.
      Delimiting character is ASCII ":".

      If there are not enough space to store above characters, the operation of this function is not guaranteed.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16/18, 16i/18i/21i)
    This function cannot be used at TT.
    EW_NOOPT No option
    The DNC2 option, and the extended driver/library function are necessary.

    data\cnc_rdcomopemsg

    Reads operator's message for DNC1,DNC2.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcomopemsg(unsigned short FlibHndl, char *opemsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    opemsg out

    Five operator's messages are returned at maximum.
    Each messages are terminated with NULL character and must be less than 129 characters including NULL character.
    The area to store operator's message must be declared as;

    char opemsg[5][129] ;

    If it is not declared as above, the operation of this function is not guaranteed.


    ERRORS

    Code Description
    EW_NOOPT No option
    The DNC1, DNC2 option, and the extended driver/library function are necessary.

    data\cnc_rdcomparam

    Reads communication parameters for DNC1, DNC2 or OSI-Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcomparam(unsigned short FlibHndl, IODBCPRM *odb);


    ARGUMENTS

    Name Direction Description
    FlibHndl in Specify the library handle. See "Library handle" for details.
    odb out Pointer to the IODBCPRM structure where communication parameters are returned.

    The IODBCPRM structure is as follows.

    typedef struct {
        char           NcApli[65] ;
        char           Dummy1 ;
        char           HostApli[65] ;
        char           Dummy2 ;
        unsigned long  StatPstv ;
        unsigned long  StatNgtv ;
        unsigned long  Statmask ;
        unsigned long  AlarmStat ;
        unsigned long  PsclHaddr ;
        unsigned long  PsclLaddr ;
        unsigned short SvcMode1 ;
        unsigned short SvcMode2 ;
        long           FileTout ;
        long           RemTout ;
    } IODBCPRM ;
    
    NcApli
    CNC application name
    NULL terminated character string with maximum length of 65 characters including NULL. This is valid only for OSI-Ethernet.

    Dummy1
    not used

    HostApli
    Host application name
    NULL terminated character string with maximum length of 65 characters including NULL.
    This is valid only for OSI-Ethernet.

    Dummy2
    not used

    StatPstv
    Status report mask (positive edge)
    Status report mask bits, which enable or mask reporting CNC status information to DNC1,DNC2, OSI-Ethernet board, are returned.
    If any of the following bits is "1", corresponding status information is reported when its state changes from "0" to "1". Bit type data.
    0 : mask report
    1 : enable report

    • DNC1, DNC2
    • bit 0 : [RWD] Rewind signal
      bit 1 : [AL] Alarm signal
      bit 2 : [RST] Reset state signal
      bit 3 : [SPL] Automatic operation suspend-in-progress signal
      bit 4 : [STL] Automatic operation start in-progress signal
      bit 5 : [OP] Automatic operation in-progress signal
      bit 6 : [SA] Servo ready
      bit 7 : [MA] CNC ready
      bit 8 : [M00] Decoded M00 signal (HEAD2)
      bit 9 : [M01] Decoded M01 signal ( " )
      bit10 : [M02] Decoded M02 signal ( " )
      bit11 : [M30] Decoded M30 signal ( " )
      bit12 : [M00] Decoded M00 signal (HEAD1)
      bit13 : [M01] Decoded M01 signal ( " )
      bit14 : [M02] Decoded M02 signal ( " )
      bit15 : [M30] Decoded M30 signal ( " )
      * BIT08 to BIT11 are valid when two-path control function is available, and not used when two-path control is not available.
      * BIT16 to BIT31 are not used.

    • OSI-Ethernet
    • bit 0 : (not used)
      bit 1 : [SPL] Automatic operation suspend-in-progress signal
      bit 2 : [STL] Automatic operation start in-progress signal
      bit 3 : (not used)
      bit 4 : [MBDT1] Optional block skip check signal
      bit 5 to 8 : (not used)
      bit 9 : [EFALM] Excess error alarm (stop & moving)
      bit10 : [PSALM] P/S alarm
      bit11 : [M00/M01] Decoded M00/M01 signal
      bit12 : [M02] Decoded M02 signal
      bit13 : (not used)
      bit14 : [M30] Decoded M30 signal
      bit15 to 27 : (not used)
      bit28 : [AL] Alarm signal
      bit29 : [OP] Automatic operation in-progress signal
      bit30 : [SA] Servo ready
      bit31 : [MA] CNC ready

    StatNgtv
    Status report mask (negative edge)
    Status report mask bits, which enable or mask reporting CNC status information to DNC1,DNC2, OSI-Ethernet board, are returned.
    If any of the following bits is "1", corresponding status information is reported when its state changes from "1" to "0".Bit type data.
    0 : mask report
    1 : enable report
    Definition of each bit is same as "StatPstv".

    StatMask
    not used

    AlarmStat
    Alarm status
    Bit type data

    • Series 15
    • bit 0 : BACKGROUND P/S ALARM
      bit 1 : FOREGROUND P/S ALARM
      bit 2 : OVER HEAT ALARM
      bit 3 : (not used)
      bit 4 : (not used)
      bit 5 : PARAMETER ENABLE SWITCH ON
      bit 6 : OVER TRAVEL ALARM
      bit 7 : PMC ALARM
      bit 8 : EXTERNAL ALARM MESSAGE
      bit 9 : (not used)
      bit10 : SERIOUS P/S ALARM
      bit11 : (not used)
      bit12 : SERVO ALARM
      bit13 : I/O ERROR
      bit14 : POWER MUST BE OFF
      bit15 : (not used)
      bit16 : BATTERY ALARM
      * BIT17 to BIT31 are not used.

    • Series 16/18, 16i/18i/21i
    • bit 0 : (not used)
      bit 1 : P/S ALARM
      bit 2 : OVER HEAT ALARM
      bit 3 : (not used)
      bit 4 : (not used)
      bit 5 : P/S 100 ALARM
      bit 6 : OVER TRAVEL ALARM
      bit 7 : (not used)
      bit 8 : (not used)
      bit 9 : (not used)
      bit10 : (not used)
      bit11 : (not used)
      bit12 : SERVO ALARM
      bit13 : P/S 101 ALARM
      bit14 : P/S 000 ALARM
      bit15 : (not used)
      bit16 : BATTERY ALARM
      * BIT17 to BIT31 are not used.


    PsclHaddr
    Pascal stack address (upper limit)
    • Series 15
    • Upper limit physical address of the area, where writing data is inhibited, is returned.

    • Series 16/18, 16i/18i/21i
    • not used

    PsclLaddr
    Pascal stack address (lower limit)
    • Series 15
    • Lower limit physical address of the area, where writing data is inhibited, is returned.

    • Series 16/18, 16i/18i/21i
    • not used

    SvcMode1
    Service mode 1
    not used

    SvcMode2
    Service mode 2
    Bit type data
    Selects the operation of the "read entire file directory" function of the DNC1 and OSI-Ether-net option as follows.

      bit 0 = 0 : file number and size
      = 1 : file number only
      * BIT01 to BIT15 are not used
      * In case of DNC2 function, this bit is not used and only file number is obtained by "read entire file directory" function.

    FileTout
    File request time-out
    Time-out value for file request is returned.
    When "0" is set for the time-out value, conventional fixed time value (25.6sec approx.) is used as the time-out value.
    Time-out time is incremented on every 32 msec internally. Actual time to time-out is cal-culated as follows.

    Tout = ( (FileTout) / 32 + 1

    ) x 32 [msec]
    In calculating underlined part above, fraction part is discarded.

    • Series 15
    • Valid only for OSI-Ethernet. Not used for DNC1 and DNC2.

    • Series 16/18, 16i/18i/21i
    • Valid for DNC1, DNC2 and OSI-Ethernet all.

    RemTout
    Remote request time-out
    Time-out value for remote request is returned.
    Refer to "FileTout" for details.

    • Series 15
    • Valid only for OSI-Ethernet. Not used for DNC1 and DNC2.

    • Series 16/18, 16i/18i/21i
    • Valid for DNC1, DNC2 and OSI-Ethernet all.

    ERRORS

    Code Description
    EW_NOOPT No option
    The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary.

    data\cnc_rddncfname

    Reads the name of the file in the host computer for DNC operation using DNC1, DNC2 or OSI-Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddncfname(unsigned short FlibHndl, char *FileName);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    FileName out Name of the file in the host computer for DNC operation is returned. The file name is terminated with NULL character and maximum length of the file name is 65 characters including NULL character. FileName area must have enough space to store 65 characters, otherwise the operation of this function is not guaranteed.

    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 15)
    This function cannot be used at 15TT.
    EW_NOOPT No option
    The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary.

    data\cnc_rddsdevinfo

    All the number of pages , the use number of pages, the total number of entries, and the numberof use entries are taken out from an ATA card.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddsdevinfo(unsigned short FlibHndl, short type, ODBPDFINF *info);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in The unnit of the information to takeout is specfied .
    The following specification is possible.
    0 : Page
    1 : Byte
    2 : KByte (1KByte = 1024Byte)
    3 : MByte (1MByte = 1024KByte)
    info out The pointer to the ODBPDFINF structure for storing the information on the taken out ATA card is specified. With the value of a type, the unit of capacity switches to a page per (K,M)byte.
    ODBPDFINF structure is as follows:
    typedef struct odbpdfinf {
        long    used_page;  /* active capacity     */
        long    all_page;   /* full capacity       */
        long    used_dir;   /* active entry number */
        long    all_dir;    /* full entry number   */
    } ODBPDFINF;
    

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_NUMBER Data number error
    The Specification of type is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    464 : The ATA card is not formated.

    data\cnc_rddsdir

    • DATA SERVER
    • The current folder name of the ATA card of DATA SERVER function is taken out with a full path.

    • DATA SERVER Host
    • The connection host number as which the DATA SERVER function is chosen,or the current folder receive with a full path.

    • Embedded Ethernet
    • The connection host number as which the embedded ethernet function is chosen,or the current folder receive with a full path.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddsdir(unsigned short FlibHndl, char *dev_name, short *host, char *path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored is specified.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"

    host out (*Used only at time of DATA SERVER Host or Embedded Ethernet)
    The pointer to the variable area which stores the taken out connection host number is specfied.
    The numerical value of 1 to 3 returns.
    Moreover, when not using it, 0 returns.

    path out The pointer to the variable area which stores the taken out current folder name is specfied.
    The current folder name to receive 256 bytes or less of ASCII characters string including NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_DATA Data error
    The Specification of dev_name is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    501 : Acquision of file information went wrong from the host computer.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_rddsdncfile

    • DATA SERVER
    • The file name set to DNC operation at the time of the Storage mode of DATA SERVER function is taken out with a full path.

    • DATA SERVER Host
    • The file name set to DNC operation at the time of the FTP mode or buffer mode of DATA SERVER function is taken out with a full path.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddsdncfile(unsigned short FlibHndl, char *dev_name, short *host, char *dncfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored is specified.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    host out (*Used only at time of DATA SERVER Host)
    The pointer to the variable area which stores the connection host number is specfied.
    The numerical value of 1 to 3 returns.
    However, when the file for DNC operation is not set up, 0 returns.
    dncfile out The pointer to the variable area which stores the taken out file name is specfied.
    The current file name to receive 256 bytes or less of ASCII characters string including NULL.
    When the file for DNC operation is not set up, only NULL may return.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_DATA Data error
    The Specification of dev_name is wrong.

    data\cnc_rddsfile

    • DATA SERVER
    • The list of the files in the current folder of DATA SERVER function (a sub folder is included) is taken out.

    • DATA SERVER Host
    • The list of the files in the current folder of the present connection host of DATA SERVER function (a sub folder is included) is taken out.

    • Embedded Ethernet
    • The list of the files in the current folder of the connection host of an embedded Ethernet function (a sub folder is included) is taken out.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddsfile(unsigned short FlibHndl, char *dev_name, IN_DSFILE *ds_file_in, OUT_DSINFO *ds_info_out, OUT_DSFILE *ds_file_out);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored is specified.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    Embedded Ethernet : "EMB_ETHER"
    ds_file_in in The pointer to IN_DSFILE structure which passes the setting value of file information taken out of a connection host.
    IN_DSFILE structure is as follows:
    typedef struct in_dsfile {
        char    path[256];  /* Standard File Name   */
        long    fnum;       /* Standard File Number */
        long    offset;     /* Offset               */
        short   req_num;    /* Request File Number  */
        short   size_type;  /* Size Type            */
        short   detail;     /* File Detail          */
        short   dummy;
    } IN_DSFILE;
    
    • DATA SERVER
    • path
      The file name in the ATA card of DATA SERVER used as a standard is set up.
      In the ASCII character string ,a ternimus serves as NULL
      It sets up NULL, in setting up fnum.
      fnum
      The file consective numbers in the ATA card of DATA SERVER used as a standard are set up.
      It sets up 0, in setting up path.
      offset
      The difference of the file used as the standard specfied by the head file, path, and fnum of file information which are actury taken out is set up.
      req_num
      The numder of files of file information to takeout is set up.
      req_num can set up to a maximum of 32.
      size_type
      The data unit of the size of the file information to takeout is set up.
      0 : Page
      1 : Byte
      2 : KByte (1KByte = 1024Byte)
      3 : MByte (1MByte = 1024KByte)
      detail
      It set up whether comment information is read together for the file information to take out.
      0 : Comment information is not read.
      1 : Comment information is read.

    • DATA SERVER Host,Embedded Ethernet
    • offset
      The offset value from a head file of the file information to take out is set up.
      req_num
      The numder of files of file information to takeout is set up.
      req_num can set up to a maximum of 32.
      detail
      Read only the file name or read inclusive the file information is set up for the file information to take out.
      0 : Read only the file name.
      1 : Read inclusive the file information.
    ds_info_out out It is a pointer to OUT_DSINFO structure which stores the information on the whole ATA card.
    It is a pointer to OUT_DSINFO structure which stores a connection host's file information.
    OUT_DSINFO structure is as follows:
    typedef struct out_dsinfo {
        short           type;       /* Type           */
        short           dummy;
        long            fnum;       /* Serial Number  */
        long            total;      /* Total File Number   */
        unsigned long   remain_h;   /* Remains Capacity(Upper) */
        unsigned long   remain_l;   /* Remains Capacity(Lower) */
        char            dir[256];   /* Current Folder */
    } OUT_DSINFO
    
    • DATA SERVER
    • type
      The file management format of the ATA card of DATA SERVER is returned.
      0 : CNC file management format
      fnum
      The serial numbers from the head file of the file stored in the ds_file_out are returned.
      In the case of a head file, 1 is returned.
      total
      The total of folders and files registred into the present current folder are returned.
      remain_h
      remain_l
      The remaining capacity of the ATA card of DATA SERVER is returned per byte.
      In the vase of 4Gbyte or less, remain_h is set to 0.
      dir
      The present folder in the ATA card of DATA SERVER is returned with a full path.
      In the ASCII character string ,a ternimus serves as NULL

    • DATA SERVER Host,Embedded Ethernet
    • fnum
      The serial numbers from the head file of the file stored in the ds_file_out are returned.
      In the case of a head file, 1 is returned.
      total
      The total of folders and files registered into a connection host's current folder are returned.
    ds_file_out out The pointer to OUT_DSFILE structure which stores the taken-out file information.
    The area which can store the data for the number specified by the variable req_num of Argument ds_file_in is needed.
    OUT_DSFILE structure is as follows:
    typedef struct out_dsfile {
        short           year;       /* Last Edit Time */
        short           mon;        /* Last Edit Time */
        short           day;        /* Last Edit Time */
        short           hour;       /* Last Edit Time */
        short           min;        /* Last Edit Time */
        short           sec;        /* Last Edit Time */
        long            size;       /* Size           */
        unsigned long   attr;       /* Attribute      */
        char            file[36];   /* File Name      */
        char            info[128];  /* Information    */
    } OUT_DSFILE
    
    • DATA SERVER Host,Embedded Ethernet
    • year
      Last Edit Year
      In the case of the folder, it is invalid.
      mon
      Last Edit Month
      In the case of the folder, it is invalid.
      day
      Last Edit Day
      In the case of the folder, it is invalid.
      hour
      Last Edit Hour
      In the case of the folder, it is invalid.
      min
      Last Edit Minutes
      In the case of the folder, it is invalid.
      sec
      Last Edit Seconds
      In the case of the folder, it is invalid.
      size
      Not uned.
      File Size
      Only in the case of a file it is effective.
      The value of the data unit specified by size_type returns.
      attr
      The attribute which shows a File or Folder.
      The 31th bit : Always "1"
      The 30th bit : File or folder 0:folder ,1:File
      The 3rd bit : Binary 0:Textry ,1:Binary
      The 0th bit : Prohibition of edit 0:Possible ,1:Prohibition
      Bits other than the above-mentioned are irregular.
      file
      File/Folder Name.
      Maximum of 33 characters of ASCII character string including NULL, a terminus serves as NULL.
      info
      The contents of the comment sentence immediately after a program number are stored.
      Maximum of 78 characters of ASCII character string, a terminus serves as NULL.
      When a comment sentence does not exist, the craracter string for 78 characters is returned from the head of the main part of data.
      detail is 1 and, only in the case of a file, it is effective.
      However, this information does not return about the file which has been selected as the main program.

    • DATA SERVER Host,Embedded Ethernet
    • file
      The file name for operation is returned.
      Maximum of 33 characters of ASCII character string including NULL, and place the NULL at the end.
      It becomes effective only when 1 is specified to be detail variable of argument ds_file_in.
      info
      The file name for a display or the string of file information is returned.
      Maximum of 128 characters of ASCII character string including NULL, and place the NULL at the end.
      When 0 is specified to be a detail variable of argument ds_file_in,only the file name returns.
      When 1 is specified to be a detail variable of argument ds_file_in,the file information returns.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    DATA SERVER or embedded Ethernet is processing.
    EW_LENGTH Data block length error
    The Specification of req_num is wrong.
    EW_NUMBER Data number error
    The Specification of size_type, detail is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
  • DATA SERVER Host,Embedded Ethernet
  • 468 : Connection host is not found.
    501 : Acquision of file information went wrong from the host computer.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\cnc_rdrcvmsg

    Reads contents of the receive buffer in which received message is stored.
    When this function is called, receipt status in CNC is cleared.
    The receipt status of CNC becomes ON when it receives a message.
    It becomes OFF when received message is read by "cnc_rdrcvmsg()" function or when communication screen of the CNC is selected.
    When a message which requires response is received, following message is added in the receive buffer if a response is not returned within predetermined time.

    "***** TIME OUT *****"


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrcvmsg(unsigned short FlibHndl,char *rcvmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    rcvmsg out receipt message

    Series 15
    The message is terminated with NULL character and the maximum length of the message including NULL is 667 characters.
    If the size of the area to store message is less than 667 characters, the operation of this function is not guaranteed.

    Series 16/18, 16i/18i/21i
    The message is terminated with NULL character and the maximum length of the message including NULL is 641 characters.
    If the size of the area to store message is less than 641 characters, the operation of this function is not guaranteed.

    ERRORS

    Code Description
    EW_NOOPT No option
    The OSI-Ethernet option, and the extended driver/library function are necessary.
    EW_REJECT CNC execution denial(only Series 16/18, 16i/18i/21i)
    OSI-Ethernet is initializing or restarting.

    data\cnc_rdrcvstat

    Obtains receipt status of message for OSI-Ethernet.

    The receipt status becomes ON when CNC receives a message for OSI-Ethernet, and becomes OFF when receipt message is read by

    cnc_rdrcvmsg function or when communication screen of the CNC is selected.

    When a message which requires response is received, following message is added in the receive buffer if a response is not returned within predetermined time.

    "***** TIME OUT *****"


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrcvstat(unsigned short FlibHndl, unsigned short *rcvstat);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    rcvstat out

    Receipt status of message

    0 : no message is received
    1 : message is received

    ERRORS

    Code Description
    EW_NOOPT No option
    The OSI-Ethernet option, and the extended driver/library function are necessary.

    data\cnc_rdsndmsg

    Reads contents of the transmit buffer in which transmitted message is stored.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsndmsg(unsigned short FlibHndl,char *sndmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    sndmsg in

    sending message

  • Series 15
  • The message is terminated with NULL character and the maximum length of the message including NULL is 667 characters.
    If the size of the area to store message is less than 667 characters, the operation of this function is not guaranteed.

  • Series 16/18, 16i/18i/21i
  • The message is terminated with NULL character and the maximum length of the message including NULL is 641 characters.
    If the size of the area to store message is less than 641 characters, the operation of this function is not guaranteed.

    ERRORS

    Code Description
    EW_NOOPT No option
    The OSI-Ethernet option, and the extended driver/library function are necessary.
    EW_REJECT CNC execution denial(only Series 16/18, 16i/18i/21i)
    OSI-Ethernet is initializing or restarting.

    data\cnc_sendmessage

    Sends message to the host computer.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sendmessage(unsigned short FlibHndl, char *msg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    msg in

    Sending message

    Message must be terminated with NULL character.
    Maximum length of the message including NULL is as follows.
  • Series 15
  • 75 characters
  • Series 16/18, 16i/18i/21i
  • 81 characters

    If the sending message is not terminated with NULL character, the operation of this function is not guaranteed.

    ERRORS

    Code Description
    EW_NOOPT No option
    The OSI-Ethernet option, and the extended driver/library function are necessary.
    EW_DATA Data error
    'NULL' character has been sent.
    EW_REJECT CNC execution rejected(only Series 16/18, 16i/18i/21i)
    OSI-Ethernet is initializing or restarting.

    data\cnc_wrcomparam

    Writes communication parameters for DNC1,DNC2 or OSI-Ethernet function.
    When communication parameters are written to OSI-Ethernet board following alarm will occur.

    Series 15 PW000
    Series 16/18, 16i/18i/21i P/S000


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrcomparam(unsigned short FlibHndl, IODBCPRM *idb);


    ARGUMENTS

    Name Direction Description
    FlibHndl in Specify the library handle. See "Library handle" for details.
    idb in Pointer to the IODBCPRM structure where communication parameters are set.

    The IODBCPRM structure is as follows.

    typedef struct {
        char           NcApli[65] ;
        char           Dummy1 ;
        char           HostApli[65] ;
        char           Dummy2 ;
        unsigned long  StatPstv ;
        unsigned long  StatNgtv ;
        unsigned long  Statmask ;
        unsigned long  AlarmStat ;
        unsigned long  PsclHaddr ;
        unsigned long  PsclLaddr ;
        unsigned short SvcMode1 ;
        unsigned short SvcMode2 ;
        long           FileTout ;
        long           RemTout ;
    } IODBCPRM ;
    
    NcApli
    CNC application name
    NULL terminated character string with maximum length of 65 characters including NULL can be specified. This is valid only for OSI-Ethernet.

    Dummy1
    not used

    HostApli
    Host application name
    NULL terminated character string with maximum length of 65 characters including NULL can be specified. This is valid only for OSI-Ethernet.

    Dummy2
    not used

    StatPstv
    Status report mask (positive edge)
    Set status report mask bits, which enable or mask reporting CNC status information to DNC1, DNC2 and OSI-Ethernet board.
    If any of the following bits is "1", corresponding status information is reported when its state changes from "0" to "1". Bit type data.
    0 : mask report
    1 : enable report

    • DNC1, DNC2
    • bit 0 : [RWD] Rewind signal
      bit 1 : [AL] Alarm signal
      bit 2 : [RST] Reset state signal
      bit 3 : [SPL] Automatic operation suspend-in-progress signal
      bit 4 : [STL] Automatic operation start in-progress signal
      bit 5 : [OP] Automatic operation in-progress signal
      bit 6 : [SA] Servo ready
      bit 7 : [MA] CNC ready
      bit 8 : [M00] Decoded M00 signal (HEAD2)
      bit 9 : [M01] Decoded M01 signal ( " )
      bit10 : [M02] Decoded M02 signal ( " )
      bit11 : [M30] Decoded M30 signal ( " )
      bit12 : [M00] Decoded M00 signal (HEAD1)
      bit13 : [M01] Decoded M01 signal ( " )
      bit14 : [M02] Decoded M02 signal ( " )
      bit15 : [M30] Decoded M30 signal ( " )
      * BIT08 to BIT11 are valid when two-path control function is available, and not used when two-path control is not available.
      * BIT16 to BIT31 are not used.

    • OSI-Ethernet
    • bit 0 : (not used)
      bit 1 : [SPL] Automatic operation suspend-in-progress signal
      bit 2 : [STL] Automatic operation start in-progress signal
      bit 3 : (not used)
      bit 4 : [MBDT1] Optional block skip check signal
      bit 5 to 8 : (not used)
      bit 9 : [EFALM] Excess error alarm (stop & moving)
      bit10 : [PSALM] P/S alarm
      bit11 : [M00/M01] Decoded M00/M01 signal
      bit12 : [M02] Decoded M02 signal
      bit13 : (not used)
      bit14 : [M30] Decoded M30 signal
      bit15 to 27 : (not used)
      bit28 : [AL] Alarm signal
      bit29 : [OP] Automatic operation in-progress signal
      bit30 : [SA] Servo ready
      bit31 : [MA] CNC ready

    StatNgtv
    Status report mask (negative edge)
    Set status report mask bits, which enable or mask reporting CNC status information to DNC1, DNC2 and OSI-Ethernet board.
    If any of the following bits is "1", corresponding status information is reported when its state changes from "1" to "0".Bit type data.
    0 : mask report
    1 : enable report
    Definition of each bit is same as "StatPstv".

    StatMask
    not used

    AlarmStat
    Alarm status
    Bit type data

    • Series 15
    • bit 0 : BACKGROUND P/S ALARM
      bit 1 : FOREGROUND P/S ALARM
      bit 2 : OVER HEAT ALARM
      bit 3 : (not used)
      bit 4 : (not used)
      bit 5 : PARAMETER ENABLE SWITCH ON
      bit 6 : OVER TRAVEL ALARM
      bit 7 : PMC ALARM
      bit 8 : EXTERNAL ALARM MESSAGE
      bit 9 : (not used)
      bit10 : SERIOUS P/S ALARM
      bit11 : (not used)
      bit12 : SERVO ALARM
      bit13 : I/O ERROR
      bit14 : POWER MUST BE OFF
      bit15 : (not used)
      bit16 : BATTERY ALARM
      * BIT17 to BIT31 are not used.

    • Series 16/18, 16i/18i/21i
    • bit 0 : (not used)
      bit 1 : P/S ALARM
      bit 2 : OVER HEAT ALARM
      bit 3 : (not used)
      bit 4 : (not used)
      bit 5 : P/S 100 ALARM
      bit 6 : OVER TRAVEL ALARM
      bit 7 : (not used)
      bit 8 : (not used)
      bit 9 : (not used)
      bit10 : (not used)
      bit11 : (not used)
      bit12 : SERVO ALARM
      bit13 : P/S 101 ALARM
      bit14 : P/S 000 ALARM
      bit15 : (not used)
      bit16 : BATTERY ALARM
      * BIT17 to BIT31 are not used.

    PsclHaddr
    Pascal stack address (upper limit)
    • Series 15
    • Set upper limit physical address of the area where writing data is inhibited.

    • Series 16/18, 16i/18i/21i
    • not used

    PsclLaddr
    Pascal stack address (lower limit)
    • Series 15
    • Set lower limit physical address of the area where writing data is inhibited.

    • Series 16/18, 16i/18i/21i
    • not used

    SvcMode1
    Service mode 1
    not used

    SvcMode2
    Service mode 2
    Bit type data
    Selects the operation of the "read entire file directory" function of the DNC1 and OSI-Ethernet option as follows.

      bit 0 = 0 : file number and size
      = 1 : file number only
      * BIT01 to BIT15 are not used
      * In case of DNC2 function, this bit is not used and only file number is obtained by "read entire file directory" function.

    FileTout
    File request time-out
    Set time-out value for file request.
    When "0" is set for the time-out value, conventional fixed time value (25.6sec approx.) is used as the time-out value.
    Time-out time is incremented on every 32 msec internally. Actual time to time-out is calculated as follows.

    Tout = ( (FileTout) / 32 + 1

    ) x 32 [msec]
    In calculating underlined part above, fraction part is discarded.

    • Series 15
    • Valid only for OSI-Ethernet. Not used for DNC1 and DNC2.

    • Series 16/18, 16i/18i/21i
    • Valid for DNC1, DNC2 and OSI-Ethernet all.

    RemTout
    Remote request time-out
    Set time-out value for remote request.
    Refer to "FileTout" for details.

    • Series 15
    • Valid only for OSI-Ethernet. Not used for DNC1 and DNC2.

    • Series 16/18, 16i/18i/21i
    • Valid for DNC1, DNC2 and OSI-Ethernet all.

    ERRORS

    Code Description
    EW_DATA Data error(only Series 15)
    Time-out parameter(FileTout, RemTout) is wrong.
    EW_NOOPT No option
    The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary.
    EW_PROT Write protection(only Series 15)
    Protection KEY(DI/KEY2) is off.
    EW_MODE CNC mode error
    The mode is not MDI.
    EW_REJECT CNC execution denial(only Series 15)
    MDI operation is in progress.

    data\cnc_wrdncfname

    Writes the name of the file in the host computer for DNC operation using DNC1, DNC2 or OSI-Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrdncfname(unsigned short FlibHndl, char *FileName);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    FileName in Specify the name of the file for DNC operation in the host computer. The file name must be terminated with NULL character and its length must be less than or equal to 65 characters including NULL character. The operation of this function is not guaranteed, if the file name is not terminated with NULL character.

    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 15)
    This function cannot be used at 15TT.
    EW_NOOPT No option
    The DNC1, DNC2, OSI-Ethernet option, and the extended driver/library function are necessary.

    data\cnc_wrdsdncfile

    • DATA SERVER
    • The file for DNC operation at the time of the storage mode of DATA SERVER function is set up.

    • DATA SERVER Host
    • The file for DNC operation at the time of the FTP mode or buffer mode of DATA SERVER function is set up.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrdsdncfile(unsigned short FlibHndl, char *dev_name, char *dncfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dev_name in The pointer of the variable area where the device name to specify is stored is specified.
    Specify the device name is as follows:
    DATA SERVER : "DATA_SV"
    DATA SERVER Host : "DTSVR_HOST"
    dncfile in
    • DATA SERVER
    • The pointer to the variable area where the file name to set up is stored is specfied.
      The file name to receive 256 bytes or less of ASCII characters string including NULL.

    • DATA SERVER Host
    • The pointer to the variable area where the file name to set up is stored is specfied.
      The file name to receive 128 bytes or less of ASCII characters string including NULL.
      It bocomes specfication of only a file name.
      A connection host number and a folder turn into the host number and current folder which are connected now.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_BUSY Busy
    - Try again because DATA SERVER is processing.
    EW_DATA Data error
    The Specification of dev_name is wrong.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value,In order to get more information for this err_no return value,cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
  • DATA SERVER
  • 464 : The ATA card is not formated.
    494 : The ATA card is not formated.
  • DATA SERVER Host
  • 468 : Connection host is not found.
    494 : The specified file is not fount.
    501 : Acquision of file information went wrong from the host computer.
    507 : Change of a directory went wrong.
    508 : Login to a connection host went wrong.
    509 : Connection with a connection host went wrong.
    511 : An error is in a connection host's parameter.

    data\ds_cancel

    The execution of the function for the following DATA SERVER is stopped.

    ds_delhddfile Delete of file in hard disk
    ds_copyhddfile Copy of file in hard disk
    ds_puthddfile PUT of file in hard disk
    ds_mputhddfile MPUT of file in hard disk
    ds_lputhddfile LIST-PUT of file in hard disk
    ds_ldelhddfile LIST-DELETE of file in hard disk
    ds_gethostfile GET of host file
    ds_mgethostfile MGET of host file
    ds_lgethostfile LIST-GET of host file

    When execution is discontinued by this function, not EW_OK but EW_RESET is returned to the return value of this function. If the process of the DATA SERVER had already ended when this function was executed, the same value as ds_rdresult is returned to the this function.

    In case of the execution of the above function, the DATA SERVER keeps the state of the occupation until the execution is discontinued by this function or the execution result(normal termination or the errors other than EW_BUSY) is acquired by the ds_rdresult.

    If these function is executed when the DATA SERVER is occupied, the EW_REJECT error will occur.

    This function is available even to "Fast Ethernet".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_cancel(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_RESET FTP command stop
    The FTP command was stopped.
    EW_FUNC Function unexecution for DATA SERVER
    The function for the DATA SERVER is not executed.
    EW_NOOPT No option
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_checkhdd

    Whether a defective sector exists in the hard disk is checked.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_checkhdd(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_chghdddir

    Change the work directory(current directory) of hard disk in the DATA SERVER.

    This function is available even to "Fast Ethernet".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_chghdddir(unsigned short FlibHndl, char *dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_name in

    Specify the pointer to the string where the directory name which wants to change is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_copyhddfile

    The file in the hard disk of the DATA SERVER is copied.
    In this function, the control returns to the application without only requesting the copy of the file to the DATA SERVER, and waiting for the end of the copy.
    The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work.
    When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
    When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_copyhddfile(unsigned short FlibHndl, char *nc_srcfile, char *nc_dstfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_srcfile in Specify the pointer to the string where the file name of the copy source is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.
    nc_dstfile in Specify the pointer to the string where the file name of the copy destination is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_delhdddir

    Delete the directory in the hard disk of the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_delhdddir(unsigned short FlibHndl, char *dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_name in

    Specify the pointer to the string where the directory name which wants to be deleted is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_delhddfile

    The file in the hard drive of the DATA SERVER is deleted.
    The some files can be deleted simultaneously by specifying wild-card("*","?").
    In this function, the control returns to the application without only requesting the deletion of the file to the DATA SERVER, and waiting for the end of the deletion.
    The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work.
    When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
    When processing is discontinued, the occupation of the DATA SERVER is released.

    This function is available even to "Fast Ethernet".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_delhddfile(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the string where the file name which wants to be deleted is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_delhostfile

    Delete the file of host computer. The wild-card("*", "?") cannot be used to specify the name.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_delhostfile(unsigned short FlibHndl, char *net_file, long timeout);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the string where the deleted file name (file name of the host computer) is stored. Specify the Ascii string less than 128 characters which included NULL.

    timeout in

    Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.

    EW_RESET The timeout occurred while communicating to the host computer.
    EW_DTSRVR The timeout occurred because the host computer was not found.

    When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed.


    ERRORS

    Code Description
    EW_RESET Execution interruption
    The timeout processing was done while communicating with the host computer.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_download

    Outputs data to be registered(downloading).

    This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".

    The procedure of downloading is as follows.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_download(unsigned short FlibHndl, long *number, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    number in/out

    Specify the ponter of the variable to the character length of NC data.
    When this function returns, the actual number of characters that are output to CNC will be set.

    This function returns EW_LENGTH if '*number' has the value of zero or negative.

    data in

    Specify the top address of data.


    ERRORS

    Code Description
    EW_FUNC ds_dwnstart function has not been executed.
    EW_LENGTH The size of character string is zero or negative.
    EW_BUFFER Buffer full
    Retry because the buffer is full.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(10BASE-T) is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\ds_dwnend

    Notifies the end of downloading data to CNC.
    (This function must be executed after ds_download)
    This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".

    There are cases where errors during execution of downloading data returned by this function.
    Further, this function does not return until the registration of the output data by ds_download is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_dwnend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC ds_dwnstart function has not been executed.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(10BASE-T) is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\ds_dwnstart

    Requests CNC to start downloading.
    (This function must be executed before ds_download)
    This function is only for "Fast Ethernet board". This function is not supported at "Embedded Ethernet" and "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_dwnstart(unsigned short FlibHndl, char *dtsv_file, short user);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dtsv_file in Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is made in the directory "\NCDATA" of the DATA SERVER)
    • The wild-card('*','?') can be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL

    user in Specify the Task channel of the DATA SERVER.(11-17)
    DATA SERVER has 8 Task channels.
    The channel that a parsonal computer uses for transferring a file is specified by this "user".
    Available number is from 11 to 17.

    DATA SERVER can give 8 services for each user(NC, Personal computer, PMC, C-EXE).
    In order to decide which channel each user uses, it is necessary that NC parameters(No.941-948) are set with user's number as follows.

  • User's number
  • 0 : Invalid
    1 : 1'st path of CNC
    2 : 2'nd path of CNC
    3 : 3'rd path of CNC
    4 : 4'th path of CNC
    5 : 5'th path of CNC
    6 : 6'th path of CNC
    7 : 7'th path of CNC
    8 : 8'th path of CNC

    11 : Personal computer function No.1
    12 : Personal computer function No.2
    13 : Personal computer function No.3
    14 : Personal computer function No.4
    15 : Personal computer function No.5
    16 : Personal computer function No.6
    17 : Personal computer function No.7

    21 : PMC
    31 : C-EXE

  • CNC parameters
  • NO.941 : For channel No.1
    NO.942 : For channel No.2
    NO.943 : For channel No.3
    NO.944 : For channel No.4
    NO.945 : For channel No.5
    NO.946 : For channel No.6
    NO.947 : For channel No.7
    NO.948 : For channel No.8

    NC patameters(No.941-948) must be set before using this function(If these parameters are all invalid, CNC No.1 uses channel No.1).

    When you set this parameter for Personal computer function user(11-17), it is necessary to specify the channel of each path which CNC uses.
    When the user number is not set, the operation between CNC and the DATA SERVER cannot be done.
  • Example
  • 1'st channel(No.941) : 1 (1st path for CNC))
    2'nd channel(No.942) : 2 (2nd path for CNC)
    3'rd channel(No.943) : 11(Personal computer function No.1)
    4'th channel(No.944) : 12(Personal computer function No.2)

    ERRORS

    Code Description
    EW_BUSY ds_dwnstart function has been executed.
    Terminate a downloading by using ds_dwnend function.
    EW_PARAM Task channel setting error in NC parameter
    - Setting user's number 11-17 for personal computer function to NC parameters(No.941-948) is necessary.
    EW_NUMBER Task channel setting error in this function
    - Setting user's number 11-17 for personal computer function to argument"chnl" is necessary.
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER board(10BASE-T) is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\ds_formathdd

    The hard disk is formatted(initialization).


    PROTOTYPE

    FWLIBAPI short WINAPI ds_formathdd(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing other processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_gethostfile

    The file of the host computer is transferred to the hard disk of the DATA SERVER according to the "get" command of the FTP. The wild-card("*", "?") cannot be used to specify the name. In this function, the control returns to the application without only ordering the transfer of the file according to the "get" command of the FTP to the DATA SERVER, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_gethostfile(unsigned short FlibHndl, char *net_file, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the string where the file name of the transfer source(file name of the host computer) is stored. Specify the Ascii string less than 256 characters which included NULL.

    nc_file in

    Specify the pointer to the string where the file name of the transfer destination(file name in the hard disk of the data server) is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.

    data\ds_ldelhddfile

    The files in the hard disk of the DATA SERVER are deleted according to the list file. The wild-card("*", "?") cannot be used to specify the name. In this function, the control returns to the application without only ordering the deletion according to the list file to the DATA SERVER, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_ldelhddfile(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in

    Specify the pointer to the string where the list file name is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    The DATA SERVER function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_lgethostfile

    The files in the host computer are transferred to the hard disk of the DATA SERVER by the processing of FTP according to the list file. The wild-card("*", "?") cannot be used to specify the name. In this function, the control returns to the application without only ordering the transfer by FTP according to the list file to the data server, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_lgethostfile(unsigned short FlibHndl, char* net_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the string where the list file(the file in host computer) name is stored. Specify the Ascii string less than 256 characters which included NULL.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_lputhddfile

    The files in the hard disk of the DATA SERVER are transferred to the host computer by the processing of FTP according to the list file. The wild-card("*", "?") cannot be used to specify the name. In this function, the control returns to the application without only ordering the transfer by FTP according to the list file to the data server, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_lputhddfile(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in

    Specify the pointer to the string where the list file name is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_makehdddir

    Make the directory in the hard disk of the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_makehdddir(unsigned short FlibHndl, char *dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_name in

    Specify the pointer to the string where the directory name which wants to be made is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_mgethostfile

    The files of the host computer are transferred to the hard disk of the DATA SERVER according to the "mget" command of the FTP. The some files can be transferred simultaneously by specifying wild-card("*","?"). In this function, the control returns to the application without only requesting the transfer of the file according to the "mput" command of the FTP to the DATA SERVER, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_mgethostfile(unsigned short FlibHndl,char *net_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in

    Specify the pointer to the string where the file name of the transfer source(file name of the host computer) is stored. Specify the Ascii string less than 256 characters which included NULL.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.

    data\ds_mputhddfile

    The files in the hard disk of the DATA SERVER are transferred to the host computer according to the "mput" command of the FTP. The some files can be transferred simultaneously by specifying wild-card("*","?"). In this function, the control returns to the application without only requesting the transfer of the file according to the "mput" command of the FTP to the DATA SERVER, and waiting for the end of the processing. The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work. When ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel. When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_mputhddfile(unsigned short FlibHndl, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in

    Specify the pointer to the string where the file name(file name in the DATA SERVER) of the transfer source is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.

    data\ds_puthddfile

    The file in the hard disk of the DATA SERVER is transferred to the host computer side according to the "put" command of the FTP.
    The wild-card("*", "?") cannot be used to specify the name.
    In this function, the control returns to the application without only requesting the transfer of the file according to the "put" command of the FTP to the DATA SERVER, and waiting for the end of the processing.
    The final result can be acquired by ds_rdresult function.

    When this function ends normally, the process of DATA SERVER is occupied by the requested work.
    When the ds_rdresult is normal end or it returns the values other than EW_BUSY, this occupation are released.

    When the process of requested work by this function is executing, the processing can be discontinued by ds_cancel.
    When processing is discontinued, the occupation of the DATA SERVER is released.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_puthddfile(unsigned short FlibHndl, char *net_file, char *nc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    net_file in Specify the pointer to the string where the file name(file name in the host computer) of the transfer destination is stored.
    Specify the Ascii string less than 256 characters which included NULL.
    nc_file in Specify the pointer to the string where the file name(file name in the DATA SERVER) of the transfer source is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.

    data\ds_rddnchddfile

    The file name which includes the PATH name in the hard disk which is setted for the DNC operation are acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rddnchddfile(unsigned short FlibHndl, char *dnc_hddfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dnc_hddfile out

    Specify the pointer to the string to store the file name which is acquired. The Ascii string less than 32 characters which included NULL is set. The file name is acquired with PATH. When the directory name is longer than 31 characters, the last 29 characters is acquired as follows.

    "." + "." + "last 29 characters" + NULL

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rddnchostfile

    The connected host number and the file name in host computer for the DNC operation is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rddnchostfile(unsigned short FlibHndl, short *dnc_host, char *dnc_hostfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dnc_host out

    Specify the pointer to the variable to store the acquired host number. The host number is as follows.
    1 : Server No.1
    2 : Server No.2
    3 : Server No.3

    dnc_hostfile out

    Specify the pointer to the Ascii string to store the acquired file name(file name in the host computer). The Ascii string less than 256 characters which included NULL is set.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdfile

    Transfers file from DATA SERVER to hard disk on personal computer.
    This function is effective in only 16i/18i/21i. and, this function cannot be used with the 10BASE-5 board.

  • Storage mode :
  • To hard disk of PC from hard disk(or ATA) of DATA SERVER.
  • FTP mode :
  • To hard disk of PC from hard disk of host PC.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdfile(unsigned short FlibHndl, char *dtsv_file, char *pc_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dtsv_file in Specify the pointer to the file name in the DATA SERVER.
    The specification of the file name of the DATA SERVER is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • It is impossible to specify the path.
    • (The file is regarded as existing in the directory "\NCDATA" of the DATA SERVER.)
    • The wild-card('*','?') can be used.
    • Specify the MS-DOS form.
    • (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)

      <ex.> "XXXXXXXX.XXX" + NULL

      However, the "O" number is managed as a file name now.

      <ex.> "O0001" + NULL

    pc_file in Specify the pointer to the file name in the hard disk on personal computer.
    The specification of the file name of the hard disk on personal computer is as follows:
    • Use ASCII code.
    • The last character of the file name must be 'NULL'.
    • Specify with the pathname.
    • The wild-card('*','?') cannot be used.

    ERRORS

    Code Description
    EW_DATA File name(pc_file[]) is wrong, File open error, File read error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : File(pc_file[]) open error
    3 : File(pc_file[]) write error
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER function is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_REJECT CNC execution rejection
    - Try again because DATA SERVER is processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\ds_rdhdddir

    Get the file information at each file.

    The following information is acquired at each file.
    - File name
    - Comment of file
    - File attribute
    - File size
    - Update time of file

    This function is available even to "Fast Ethernet".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhdddir(unsigned short FlibHndl, char *nc_file, long offset, short *number, ODBHDDDIR *hdddir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_file in Specify the pointer to the string where the based file name is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.
    When the '\0' is specified, the process is done assuming that the file of the top in the work directory is specified.
    offset in Specify the number of offset files from the file specified by based file name(nc_file).
    The file information is acquired from the position where the number of files specified by this data was skipped.
    When the file name or the '\0' is specified for the based file name and the number of offsets which does not exist in the DATA SERVER is given, the last file information in the work directory is got.
    When NULL is specified for the based file name and the number of offsets which does not exist in the DATA SERVER is given, the EW_NUMBER is returned.
    number in/out Specify the pointer to the variable where the number of file information which wants to be acquired was setted.
    Specify the 1 to 32 for this data.
    This function returns the number of data which was acquired actually.
    hdddir out Specify the pointer to the ODBHDDDIR structure to store the file information which is acquired.

    The ODBHDDDIR structure is as follows.

    typedef struct _odbhdddir {
        char    file_name[64];
        char    comment[80];
        short   attribute;
        short   reserved;
        long    size;
        char    date[16];
    } ODBHDDDIR;
    
    hdddir[n].file_name[64]
    File name
    The Ascii string less than 64 characters which included NULL is set.
    hdddir[n].comment[80]
    Comment of file
    The Ascii string less than 80 characters which included NULL is set.
    hdddir[n].attribute
    File attribute
    bit 4 = 0 : File
    1 : Directory
    hdddir[n].reserved
    Reserved (unused)
    hdddir[n].size
    File size
    hdddir[n].date[16]
    Update time of file
    The Ascii string of "yy-mm-dd hh:mm" format which terminated by NULL is set.

    ERRORS

    Code Description
    EW_LENGTH Data length error
    The number of file information(*number) is wrong.
    EW_NUMBER Data number error
    When the based file name is NULL, the number(offset) of offsets which does not exist in the DATA SERVER is given.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdhddinfo

    Get the information of hard disk of DATA SERVER.

    The following information can be acquired.

    - The remainder capacity of hard disk.
    - The name of work directory.
    - The number of files in work directory.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhddinfo(unsigned short FlibHndl, ODBHDDINF *hddinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hddinfo out

    Specify the pointer to ODBHDDINF structure to store the directory information which is acquired.

    The ODBHDDINF structure is as follows.
    typedef struct _odbhddinf {
        long    file_num;
        long    remainder_l;
        long    remainder_h;
        char    current_dir[32];
    } ODBHDDINF;
    
    hddinfo.file_num
    The numbers of files in the work directory.
    hddinfo.remainder_l, hddinfo.remainder_h
    The remainder capacity of hard disk.
    The disk capacity is 8 bytes. The lower value is set in the remainder_l and the upper value is set in the remainder_h.
    hddinfo.current_dir[32]
    The name of work directory.
    The Ascii string less than 32 characters which included NULL is set.
    The directory name is acquired with PATH.
    When the directory name is longer than 31 characters, the last 29 characters is acquired as follows.

    "." + "." + "last 29 characters" + NULL

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdhostdir

    Get the file information of host computer.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhostdir(unsigned short FlibHndl, short type, long offset, short *number, ODBHOSTDIR *hostdir, long timeout);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of file information which wants to be acquired. Specify the following type.
    0 : File name
    1 : Detail information
    offset in

    Specify the number of offset files from top file of the file information which wants to be acquired.
    When the number of offsets which does not exist on the host computer side is given, the EW_NUMBER is returned.

    number in/out

    Specify the pointer to the variable where the number of file information which wants to be acquired was setted. Specify the 1 to 32 for this data. This function returns the number of data which was acquired actually.

    hostdir out

    Specify the pointer to the ODBHOSTDIR structure to store the file information which is acquired. The ODBHOSTDIR structure is as follows.

    typedef struct _odbhostdir {
        char    host_file[128];
    } ODBHOSTDIR;
    
    hostdir.host_file[128]
    File name or detail information is set.
    The Ascii string less than 128 characters which included NULL is set.
    timeout in

    Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.

    EW_RESET The timeout occurred while communicating to the host computer.
    EW_DTSRVR The timeout occurred because the host computer was not found.
    When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed.


    ERRORS

    Code Description
    EW_RESET Execution interruption
    The timeout processing was done while communicating with the host computer.
    EW_LENGTH Data length error
    The number of file information(*number) is wrong.
    EW_NUMBER Data number error
    the number(offset) of offsets which does not exist is given.
    EW_ATTRIB Data attribute error
    The type of file information(type) is wrong.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdhostdir2

    Get the number of files and file information of login directory on the host computer. Information acquired in ds_rdhostinfo and ds_rdhostdir can be acquired at the same time according to this function.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhostdir2(unsigned short FlibHndl, short type, long offset, short *number, long *hostinfo, ODBHOSTDIR *hostdir, long timeout);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of file information which wants to be acquired. Specify the following type.
    0 : File name
    1 : Detail information
    offset in

    Specify the number of offset files from top file of the file information which wants to be acquired.
    When the number of offsets which does not exist on the host computer side is given, the EW_NUMBER is returned.

    number in/out

    Specify the pointer to the variable where the number of file information which wants to be acquired was setted. Specify the 1 to 32 for this data. This function returns the number of data which was acquired actually.

    hostinfo out

    Specify the pointer to the variable to store the host information(nunbers of file) which is acquired.

    hostdir out

    Specify the pointer to the ODBHOSTDIR structure to store the file information which is acquired. The ODBHOSTDIR structure is as follows.

    typedef struct _odbhostdir {
        char    host_file[128];
    } ODBHOSTDIR;
    
    hostdir.host_file[128]
    File name or detail information is set.
    The Ascii string less than 128 characters which included NULL is set.
    timeout in

    Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.

    EW_RESET The timeout occurred while communicating to the host computer.
    EW_DTSRVR The timeout occurred because the host computer was not found.
    When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed.


    ERRORS

    Code Description
    EW_RESET Execution interruption
    The timeout processing was done while communicating with the host computer.
    EW_LENGTH Data length error
    The number of file information(*number) is wrong.
    EW_NUMBER Data number error
    the number(offset) of offsets which does not exist is given.
    EW_ATTRIB Data attribute error
    The type of file information(type) is wrong.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdhostinfo

    Get the information of login directory of the host computer.

    The following information is acquired.

    The numbers of file in login directory.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhostinfo(unsigned short FlibHndl, long *hostinfo, long timeout);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hostinfo out

    Specify the pointer to the variable to store the host information(nunbers of file) which is acquired.

    timeout in

    Specify the time for timeout by the second. When 0 or less is specified, the timeout processing is not done. In the timeout processing, the following two kinds of return values might be returned.

    EW_RESET The timeout occurred while communicating to the host computer.
    EW_DTSRVR The timeout occurred because the host computer was not found.

    When the power supply of the host computer is dropped at the time of communicating with the host, the timeout processing is executed.


    ERRORS

    Code Description
    EW_RESET Execution interruption
    The timeout processing was done while communicating with the host computer.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdhostno

    Get the host number of the connected host computer.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdhostno(unsigned short FlibHndl, short *host_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    host_no out

    Specify the pointer to the variable to store the host number. The host number is as follows.
    1 : Server No.1
    2 : Server No.2
    3 : Server No.3


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdm198hdddir

    The work directory for the M198(subprogram call) is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdm198hdddir(unsigned short FlibHndl, char *m198_dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    m198_dir out

    Specify the pointer to the character string to store the work directory which is acquired. The Ascii string less than 32 characters which included NULL is set. The directory name is acquired with PATH. When the directory name is longer than 31 characters, the last 29 characters is acquired as follows.

    "." + "." + "last 29 characters" + NULL

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdm198host

    Connected host number for the M198(subprogram call) is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdm198host(unsigned short FlibHndl, short *host_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    host_no in

    Specify the pointer to the variable to store the acquired host number. The host number is as follows.

    1 : Server No.1
    2 : Server No.2
    3 : Server No.3

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdmntinfo

    The data for troubleshooting is acquired as maintenance information for the file transfer between the DATA SERVER and CNC.

    The maximum channel number for the file transfer between the data server and CNC is 8. Which channel is used for each path of CNC can be set in CNC parameter No.941-948.

    The following maintenance information on each channel can be acquired.
    Number of data delay
    Number of transferring total bytes
    Read pointer
    Write pointer


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdmntinfo(unsigned short FlibHndl, short ch_no, DSMNTINFO *mnt_info);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    ch_no in

    Specify the channel number of maintenance information which wants to be acquired. For this data, the number from 1 to number of channel can specify. The number of channels can be acquired by etb_rdparam.

    mnt_info out

    Specify the pointer to DSMNTINFO structure to store the maintenance information which is acquired. The DSMNTINFO structure is as follows.

    typedef struct _dsmntinfo {
        unsigned short  empty_cnt;
        unsigned long   total_size;
        unsigned short  ReadPtr;
        unsigned short  WritePtr;
    } DSMNTINFO;
    
    mnt_info.empty_cnt
    Number of data delay
    The counter to which the data transfer from the DATA SERVER to CNC was delayed is set. When the power supply is turned on this value is initialized to 0. And when the requirement is filled, the counter is incremented.
    mnt_info.total_size
    Number of transferring total bytes
    The number of total bytes of one NC program transferred from the DATA SERVER to CNC is set.
    mnt_info.ReadPtr
    Read pointer
    The read pointer is set.
    mnt_info.WritePtr
    Write pointer
    The write pointer is set.


    ERRORS

    Code Description
    EW_NUMBER Data number error
    Channel number(ch_no) is wrong.
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.

    data\ds_rdmode

    Get the mode for the DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdmode(unsigned short FlibHndl, short *dsmode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsmode out Specify the pointer to the variable to store the mode which is acquired. The DATA SERVER mode is as follows.
    0 : Storage mode
    1 : Buffer mode
    2 : FTP mode

    ERRORS

    Code Description
    EW_NOOPT No option

    data\ds_rdncfile

    The NC program is inputted from the hard drive to the NC.

  • Storage mode :
  • To CNC memory from hard disk(or ATA) of DATA SERVER
  • FTP mode :
  • To CNC memory from hard disk of host PC.

    The wild-card("*", "?") cannot be used to specify the name.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdncfile(unsigned short FlibHndl, short type,char *file_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in Specify the library handle. See "Library handle" for details.
    type in Specify the file type.
    When the value of excepting 0 is specified, EW_ATTRIB error occurs.
    file_name in Specify the pointer to the string where the file name(file name in the DATA SERVER) which wants to be inputted to the NC is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.

    ERRORS

    Code Description
    EW_RESET Reset request
    Process is canceled by [RESET].
    EW_BUSY Busy
    The CNC state is as follows.
  • Alarm(PS000, PS101) in CNC side
  • I/O channel number(CNC parameter) is wrong.
  • Background edit processing in CNC side.
  • MDI program is editing or running in CNC side.
  • EW_NUMBER Data number error
    The specified file does not exist in the DATA SERVER.
    EW_ATTRIB Data attribute error
    The file type(type) is wrong.
    EW_DATA Data error
    The program has already been registered.
    EW_NOOPT No option
    EW_OVRFLOW Memory overflow
  • CNC tape memory is overflowed.
  • The total number of program exceeded the limit of registrable programs in CNC.
  • EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdncfile2

    The NC program is inputted from the hard drive to the NC.

  • Storage mode :
  • To CNC memory from hard disk(or ATA) of DATA SERVER
  • FTP mode :
  • To CNC memory from hard disk of host PC.

    When the O number of file name in the DATA SERVER and the O number in contents of file is different, O number is registered according to the ONS(No.900#1) of CNC parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdncfile2(unsigned short FlibHndl, char *file_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_name in

    Specify the pointer to the string where the file name(file name in the DATA SERVER) which wants to be inputted to the NC is stored. The format of file name is as follows.

  • In case of O 4 digits
  • "O" + string(program number) of 4 digits + NULL
  • In case of O 8 digits
  • "O" + string(program number) of 7 digits + NULL

    So, the NC program registered by the file names other than the above-format cannot be input. The wild-card("*", "?") cannot be used to specify the name.


    ERRORS

    Code Description
    EW_RESET Reset request
    Process is canceled by [RESET].
    EW_BUSY Busy
    The CNC state is as follows.
  • Alarm(PS000, PS101) in CNC side
  • I/O channel number(CNC parameter) is wrong.
  • Background edit processing in CNC side.
  • MDI program is editing or running in CNC side.
  • EW_NUMBER Number error
    The file name(file_name) is wrong. Specify the following format.
  • In case of O 4 digits
  • "O" + string of 4 digits + NULL
  • In case of O 8 digits
  • "O" + string of 7 digits + NULL
    EW_DATA Data error
  • The specified file has already been registered.
  • The specified file does not exist in the DATA SERVER.
  • The selected program was about to be overwrited.
  • Specified program number is protected by cnc_setpglock function.
  • EW_NOOPT No option
    EW_PROT Write protection error
  • Protection key in CNC is OFF.
  • Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
  • EW_OVRFLOW Memory overflow
  • CNC tape memory is overflowed.
  • The total number of program exceeded the limit of registrable programs in CNC.
  • EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_rdresult

    Get the execution result of the function for the following DATA SERVER.

    ds_delhddfile Delete of file in hard disk
    ds_copyhddfile Copy of file in hard disk
    ds_puthddfile PUT of file in hard disk
    ds_mputhddfile MPUT of file in hard disk
    ds_lputhddfile LIST-PUT of file in hard disk
    ds_ldelhddfile LIST-DELETE of file in hard disk
    ds_gethostfile GET of host file
    ds_mgethostfile MGET of host file
    ds_lgethostfile LIST-GET of host file

    In case of the execution of the above function, the DATA SERVER keeps the state of the occupation until the execution result(normal termination or the errors other than EW_BUSY) of the function is acquired by this function or the execution is discontinued by ds_cancel.

    If these function is executed when the DATA SERVER is occupied, the EW_REJECT error will occur.

    When this function retuens EW_DTSRVR error, in order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    Function Name Detail Meaning
    ds_delhddfile 0xfe07 Deletion failed.
    ds_copyhddfile 0xfe0f The file of the same name was found.
    0xfe15 Copy failed.
    ds_puthddfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe0a File PUT failed.
    0xfe12 File not found
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.
    ds_mputhddfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe0a MPUT failed.
    0xfe23
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.
    ds_gethostfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe09 File GET failed.
    0xfe0f The file of the same name was found.
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.
    ds_mgethostfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe09 MGET failed.
    0xfe22
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.
    ds_lputhddfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe0a List-Put failed.
    0xfe10
    0xfe24
    0xfe0c File open failed.
    0xfe12 File not found.
    0xfe28 List format error.
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.
    ds_ldelhddfile 0xfe0c File open failed.
    0xfe10 List-Delete failed.
    0xfe24
    0xfe27
    0xfe28 List format error.
    ds_lgethostfile 0xfe01 Mistake of parameter for connected host.
    0xfe04 User name/Password is wrong.
    0xfe09 List-Get failed.
    0xfe10
    0xfe24
    0xfe25
    0xfe0c File open failed.
    0xfe0f The file of the same name was found.
    0xfe28 List format error.
    0xfe2b FTP not ready
    0xfe03 Connection error to FTP server.
    0xfe05
    0xfe06
    0xfe2c
    0xfe2d The server or the router is not found.

    This function is available even to "Fast Ethernet".


    PROTOTYPE

    FWLIBAPI short WINAPI ds_rdresult(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    The function for the DATA SERVER has already been executed.
    EW_FUNC Function unexecution for DATA SERVER
    The function for the DATA SERVER is not executed.
    EW_NOOPT No option
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_renhddfile

    The file name in the hard disk of the DATA SERVER is changed.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_renhddfile(unsigned short FlibHndl, char *nc_srcfile, char *nc_dstfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    nc_srcfile in Specify the pointer to the character string where the old file name is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.
    nc_dstfile in Specify the pointer to the character string where the new file name is stored.
    The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_searchresult

    Gets the result of ds_searchword function.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_searchresult(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_FUNC ds_searchword was not called prior to this function
    EW_DATA Data error
    The target string to search is not found.
    EW_NOOPT No option
    The extended driver/library function and the DATA SERVER function are necessary.

    data\ds_searchword

    The string of the NC program in DATA SERVER at the running of M198/DNC in MEM/RMT mode is searched.
    The result of search can be confirmed by ds_searchresult.
    When the specified string is found, the pointer moves to the found line.

    The basic order to search is as follows.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_searchword(unsigned short FlibHndl, char *prog_data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_data in

    Specify the pointer to the buffer holding the target string to search.
    It is a NULL terminated ASCII string. The size of string, including NULL character, must be within 16. If it were more than 16, this function would return EW_DATA error.

    The top of search string should be the following characters.
    When the top character is not the following characters, the string cannot be searched. The return value is EW_DATA.

    • A〜Z(except "O") "(" "/" "#" ";"(EOB)


    ERRORS

    Code Description
    EW_BUSY Busy
    Some alarm has existed or CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Error except EW_DATA
    1 : The size of string error
    2 : The content of the string error
    EW_PARAM Parameter error
    Parameter No.900#2 is off.
    EW_NOOPT No option
    The extended driver/library function and the DATA SERVER function are necessary.
    EW_MODE CNC mode error
    CNC mode is not MEM or RMT mode.
    EW_REJECT CNC execution rejection
    - The DATA SERVER is not mounted.
    - It is not the program within the DATA SERVER.
    - CNC is running.
    EW_STOP STOP
    CNC is in the emergency stop or feed fold is ON.

    data\ds_wrdnchddfile

    The file name in the hard disk of the DATA SERVER for DNC operation is set.

    The current work directory is set together with the file name as the work directory for the DNC operation.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrdnchddfile(unsigned short FlibHndl, char *dnc_hddfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dnc_hddfile in

    Specify the pointer to the character string where the file name (file name in the hard disk of the DATA SERVER) which wants to be set is stored. The 63 characters from the head are recognized as file name, but the file name in DATA SERVER is managed by the format of 8.3.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrdnchostfile

    The file name of the host computer for DNC operation is set.

    The current connected host computer is set together with the file name as the connected host for the DNC operation.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrdnchostfile(unsigned short FlibHndl, char *dnc_hostfile);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dnc_hostfile in

    Specify the pointer to the string where the file name(file name in the host computer) which wants to be set is stored. Specify the Ascii string less than 256 characters which included NULL.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrfile

    Transfers file from hard disk on personal computer to DATA SERVER.
    This function is effective in only 16i/18i/21i. and, this function cannot be used with the 10BASE-5 board.

  • Storage mode :
  • To hard disk(or ATA) of DATA SERVER from hard disk of PC.
  • FTP mode :
  • To hard disk of host PC from hard disk of PC.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrfile(unsigned short FlibHndl, char *pc_file, char *dtsv_file);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pc_file in Specify the pointer to the file name in the hard disk on personal computer.

    The specification of the file name of the hard disk on personal computer is as follows:

    - Use ASCII code.
    - The last character of the file name must be 'NULL'.
    - Specify with the pathname.
    - The wild-card('*','?') cannot be used.
    dtsv_file in Specify the pointer to the file name in the DATA SERVER.

    The specification of the file name of the DATA SERVER is as follows:

    - Use ASCII code.
    - The last character of the file name must be 'NULL'.
    - It is impossible to specify the path.
    (The file is made in the directory "\NCDATA" of the DATA SERVER)
    - The wild-card('*','?') cannot be used.
    Specify the MS-DOS form.
    <ex.> "XXXXXXXX.XXX" + "NULL"

    However, the "O" number is managed as a file name now.

    <ex.> "O0001" + "NULL"

    ERRORS

    Code Description
    EW_DATA File name(pc_file[]) is wrong, File open error, File read error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : File(pc_file[]) open error
    2 : File(pc_file[]) read error
    EW_NOOPT No option
    - The extended driver/library function is necessary.
    - The DATA SERVER function is necessary.
    - Hard disk is necessary on the DATA SERVER board.
    EW_REJECT CNC execution rejection
    - Try again because DATA SERVER is processing.
    EW_DTSRVR DATA SERVER error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBERR structure.As for the details, see "Ethernet Board/DATA SERVER Board OPERATOR'S MANUAL".
    0xf000, 0xfe00- : Error code from DATA SERVER
    1 : Time out in DATA SERVER's operation

    data\ds_wrhostno

    The host computer which works the FTP server which becomes the other party of the communication of the DATA SERVER is changed.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrhostno(unsigned short FlibHndl, short host_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    host_no in

    Specify the host number which wants to connect. The host number which can be specified is as follows.

    1 : Server No.1
    2 : Server No.2
    3 : Server No.3

    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrm198hdddir

    The work directory for the M198(subprogram call) is set.

    The current directory in the hard disk of the DATA SERVER is set as the work directory for the M198.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrm198hdddir(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrm198host

    Connected host number for the M198(subprogram call) is set.

    The connected host of now becomes the host for the M198(subprogram call).


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrm198host(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrmode

    Set the mode for the DATA SERVER. The mode of the DATA SERVER which can be set is shown as follows.

    Storage mode
    Buffer mode
    FTP mode
    When the hard drive is not mounted, the mode automatically becomes the FTP mode.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrmode(unsigned short FlibHndl, short dsmode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsmode in The mode of the DATA SERVER which wants to set is specified. Specify the following mode.
    0 : Storage mode
    1 : Buffer mode
    2 : FTP mode

    ERRORS

    Code Description
    EW_DATA Data error
    The mode(dsmode) of DATA SERVER is wrong.
    EW_NOOPT No option
    EW_MODE CNC mode error
    CNC mode is not MDI mode.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\ds_wrncfile

    The NC program is outputted from the NC to the hard drive.

  • Storage mode :
  • To hard disk(or ATA) of DATA SERVER from CNC memory.
  • FTP mode :
  • To hard disk of PC from CNC memory.

    The wild-card("*", "?") cannot be used to specify the name.


    PROTOTYPE

    FWLIBAPI short WINAPI ds_wrncfile(unsigned short FlibHndl, short type, long prog_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the file type.

    0 : The specified program number is output.
    1 : All programs in NC are output.

    * When type=1 is specified, program number (prog_no) is disregarded. And, the file name becomes "ALLPRG".

    prog_no in

    Specify the pointer to the string where the file name which wants to be outputted to the DATA SERVER is stored. The file by which the specified number is assumed to be a file name is made on the DATA SERVER.


    ERRORS

    Code Description
    EW_RESET Reset request
    Process is canceled by [RESET].
    EW_BUSY Busy
    The CNC state is as follows.
  • Alarm(PS000, PS101) in CNC side
  • I/O channel number(CNC parameter) is wrong.
  • Background edit processing in CNC side.
  • MDI program is editing or running in CNC side.
  • EW_NUMBER Data number error
    The specified file has already been registered in the DATA SERVER.
    EW_ATTRIB Data attribute error
    The file type(type) is wrong.
    EW_DATA Data error
    The program is not registered.
    EW_NOOPT No option
    EW_PROT Protection error
    The program is protected.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\etb_rderrmsg

    Get the error message which occurred in the Ethernet board. This function acquires the error message of the Ethernet board with the unit of a screen(38 characters * 10 lines). The total of error message screen can be acquired by etb_rdparam. The following message information can be acquired.

  • SYSTEM ERROR screen
  • TCP/IP STACK ERROR screen
  • PARAMETER ERROR screen
  • FTP SERVER MESSAGE screen
  • DATA SERVER MESSAGE screen
  • DATA SERVER #1 MESSAGE screen

  • PROTOTYPE

    FWLIBAPI short WINAPI etb_rderrmsg(unsigned short FlibHndl, short page_no, ODBETMSG *err_msg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    page_no in

    Specify the screen number for error message. Specify from 1 to number of total for screen number.

    err_msg out

    Specify the pointer to ODBTMSG structure to store the message which is acquired. The ODBETMSG structure is as follows.

    typedef struct _odbetmsg {
        char    title[33];
        char    message[10][39];
    } ODBETMSG;
    
    err_msg.title[39]
    Title of error message screen.
    The Ascii string less than 32 characters which included NULL is set.

    err_msg.message[10][39]
    Error message of message screen.
    The information of 10 lines is set. (The one line is the Ascii string less than 39 characters which included NULL.)

    ERRORS

    Code Description
    EW_NUMBER Data number error.
    The screen number(page_no) is wrong.
    EW_NOOPT No option

    data\etb_rdparam

    Get the parameter of ethernet board. The following parameter can be acquired by this function.

    • Parameter for TCP/IP
    • Parameter for connected host
    • Parameter for FTP server
    • Parameter for Ethernet function


    PROTOTYPE

    FWLIBAPI short WINAPI etb_rdparam(unsigned short FlibHndl, short type , IODBETP *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the parameter type which wants to be acquired. Specify the following type.

    0 : Parameter for TCP/IP
    1 : Parameter for connected host (for server No.1)
    2 : Parameter for connected host (for server No.2)
    3 : Parameter for connected host (for server No.3)
    4 : Parameter for FTP server
    5 : Parameter for ethernet function
    param out

    Specify the pointer to IODBETP structure to store the acquired parameter. IODBETP structure is as follows.

    typedef struct _iodbetp {
        short       ParameterType;
        union {
            TCPPRM  tcp;
            HOSTPRM host;
            FTPPRM  ftp;
            ETBPRM  etb;
        } prm;
    } ETBPARAM;
    
    typedef struct _tcpprm {
        char    OwnIPAddress[16];
        char    SubNetMask[16];
        char    RouterIPAddress[16];
    } TCPPRM;
    
    typedef struct _hostprm {
        unsigned short  DataServerPort;
        char            DataServerIPAddress[16];
        char            DataServerUserName[32];
        char            DataServerPassword[32];
        char            DataServerLoginDirectory[128];
    } HOSTPRM;
    
    typedef struct _ftpprm {
        char    FTPServerUserName[32];
        char    FTPServerPassword[32];
        char    FTPServerLoginDirectory[128];
    } FTPPRM;
    
    typedef struct _etbprm {
        char    OwnMACAddress[13];
        short   MaximumChannel;
        short   HDDExistence;
        short   NumberOfScreens;
    } ETBPRM;
    
    

    param.ParameterType
    The value of specified parameter(type) by argument of this function is set.

    param.tcpprm.OwnIPAddress[16]
    IP address of CNC
    The Ascii string less than 16 characters which included NULL is set.

    param.tcpprm.SubNetMask[16]
    Mask address of IP address on Network
    The Ascii string less than 16 characters which included NULL is set.

    param.tcpprm.RouterIPAddress[16]
    IP address of router
    The Ascii string less than 16 characters which included NULL is set.

    param.hostprm.DataServerPort
    The port number for the DATA SERVER.

    param.hostprm.DataServerIPAddress[16]
    IP address of host computer
    The Ascii string less than 16 characters which included NULL is set.

    param.hostprm.DataServerUserName[32]
    Username for login to the host computer.
    The Ascii string less than 32 characters which included NULL is set.

    param.hostprm.DataServerPassword[32]
    Password for login to the host computer.
    The Ascii string less than 32 characters which included NULL is set.

    param.hostprm.DataServerLoginDirectory[128]
    Directory name for login to the host computer.
    The Ascii string less than 128 characters which included NULL is set.

    param.ftpprm.FTPServerUserName[32]
    User name for host computer to login to DATA SERVER.
    The Ascii string less than 32 characters which included NULL is set.

    param.ftpprm.FTPServerPassword[32]
    Password for host computer to login to DATA SERVER.
    The Ascii string less than 32 characters which included NULL is set.

    param.ftpprm.FTPServerLoginDirectory[128]
    Directory name for host computer to login to DATA SERVER.
    The Ascii string less than 128 characters which included NULL is set.

    param.etbprm.OwnMACAddress[13]
    MAC address of ethernet board
    The Ascii string less than 13 characters which included NULL is set.

    param.etbprm.MaximumChannel
    Number of channels which can be used.

    param.etbprm.HDDExistence
    The state of hard disk mounting
    The value by which whether the hard disk (The ATA flash card is included) is mounted is shown is set.
    0 : Not mounted
    2 : Mounted

    param.etbprm.NumberOfScreens
    Total number of ethernet error message screen used by Ethernet function


    ERRORS

    Code Description
    EW_ATTRIB Parameter type error
    Parameter type(type) is wrong.
    EW_NOOPT No option

    data\etb_wrparam

    Set the parameter for Ethernet board. The following parameter can be set to the Ethernet board.

    • Parameter for TCP/IP
    • Parameter for connected host
    • Parameter for FTP server
    The parameter for Ethernet function cannot be set.


    PROTOTYPE

    FWLIBAPI short WINAPI etb_wrparam(unsigned short FlibHndl , IODBETP *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    param in

    Specify the pointer to IODBETP structure where the parameter is stored.

    typedef struct _iodbetp {
        short       ParameterType;
        union {
            TCPPRM  tcp;
            HOSTPRM host;
            FTPPRM  ftp;
            ETBPRM  etb;
        } prm;
    } ETBPARAM;
    
    typedef struct _tcpprm {
        char    OwnIPAddress[16];
        char    SubNetMask[16];
        char    RouterIPAddress[16];
    } TCPPRM;
    
    typedef struct _hostprm {
        unsigned short  DataServerPort;
        char            DataServerIPAddress[16];
        char            DataServerUserName[32];
        char            DataServerPassword[32];
        char            DataServerLoginDirectory[128];
    } HOSTPRM;
    
    typedef struct _ftpprm {
        char    FTPServerUserName[32];
        char    FTPServerPassword[32];
        char    FTPServerLoginDirectory[128];
    } FTPPRM;
    
    typedef struct _etbprm {
        char    OwnMACAddress[13];
        short   MaximumChannel;
        short   HDDExistence;
        short   NumberOfScreens;
    } ETBPRM;
    
    

    param.ParameterType
    Parameter type
    Specify the following type.
    0 : Parameter for TCP/IP
    1 : Parameter for connected host (for server No.1)
    2 : Parameter for connected host (for server No.2)
    3 : Parameter for connected host (for server No.3)
    4 : Parameter for FTP server

    param.tcpprm.OwnIPAddress[16]
    IP address of CNC
    Specify the Ascii string less than 16 characters which included NULL.
    (ex.:"192.168.0.1")

    param.tcpprm.SubNetMask[16]
    Mask address of IP address on Network
    Specify the Ascii string less than 16 characters which included NULL.
    (ex.:"255.255.255.0")

    param.tcpprm.RouterIPAddress[16]
    IP address of router
    Specify the Ascii string less than 16 characters which included NULL.
    If the router exists in the network, specify.
    (ex.:"192.168.0.99")

    param.hostprm.DataServerPort
    The port number for the DATA SERVER.
    Usually specify '21' for this data because the FTP service is used.

    param.hostprm.DataServerIPAddress[16]
    IP address of host computer
    Specify the Ascii string less than 16 characters which included NULL.
    (ex.:"192.168.0.101")

    param.hostprm.DataServerUserName[32]
    Username for login to the host computer.
    Specify the Ascii string less than 32 characters which included NULL.

    param.hostprm.DataServerPassword[32]
    Password for login to the host computer.
    Specify the Ascii string less than 32 characters which included NULL.

    param.hostprm.DataServerLoginDirectory[128]
    Directory name for login to the host computer.
    Specify the Ascii string less than 128 characters which included NULL.

    param.ftpprm.FTPServerUserName[32]
    User name for host computer to login to DATA SERVER.
    Specify the Ascii string less than 32 characters which included NULL.

    param.ftpprm.FTPServerPassword[32]
    Password for host computer to login to DATA SERVER.
    Specify the Ascii string less than 32 characters which included NULL.

    param.ftpprm.FTPServerLoginDirectory[128]
    Directory name for host computer to login to DATA SERVER.
    Specify the Ascii string less than 128 characters which included NULL.

    The following data is unused because the Ethernet function cannot be set.

      param.etbprm.OwnMACAddress[13]
      param.etbprm.MaximumChannel
      param.etbprm.HDDExistence
      param.etbprm.NumberOfScreens


    ERRORS

    Code Description
    EW_ATTRIB Parameter type error
    The value of ParameterType is wrong.
    EW_NOOPT No option
    EW_PROT Protection error
    Setting parameter is protected.
    EW_MODE CNC mode error
    CNC mode is not MDI mode.
    EW_REJECT CNC execution rejection
    The DATA SERVER is doing another processing.
    EW_DTSRVR DATA SERVER error
    Error occurred in DATA SERVER.

    data\eth_clrlog

    Clear the logs for Ethernet function : Embedded Ethernet[Internal port ,PCMCIA Card], Fast Ethernet board, Fast DATA SERVER board, Windows CE Embedded Ethernet[Internal port ,PCMCIA Card]


    PROTOTYPE

    FWLIBAPI short WINAPI eth_clrlog(unsigned short FlibHndl, short type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of clearing logs.
    Kind of clearing log is as follows.
    1 : Embedded Ethernet[Internal port]
    2 : Embedded Ethernet[PCMCIA LAN Card]
    3 : Fast Ethernet Board or Fast DATA SERVER Board
    4 : Windows CE Embedded Ethernet[Internal port]
    5 : Windows CE Embedded Ethernet[PCMCIA LAN Card]

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is nothing.
    21 : Windows CE Embedded Ethernet is nothing.
    22 : The option board is necessary.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    3 : Kind of device error.

    data\eth_dschkdsk

    Check disk of ATA card on DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_dschkdsk(unsigned short FlibHndl, short *result);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    result out

    Get the format of ATA card on DATA SERVER.

    0 : Normal termination
    1 : Check disk is protected because of other task operating file.
    2 : Error termination

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.

    data\eth_dsformat

    Format ATA card on DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_dsformat(unsigned short FlibHndl, short type, short *result);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify ATA card format on DATA SERVER.

    1 : CNC file management format (must be set "1")
    result out

    Get the result of ATA card formatted on DATA SERVER.

    0 : Normal termination
    1 : Format is protected because of other task operating file.
    2 : Error termination

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    304 : Format number range error.

    data\eth_rddsformat

    Get the format of ATA card on DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rddsformat(unsigned short FlibHndl, short *type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type out

    Get the format of ATA card on DATA SERVER.

    0 : None format
    1 : CNC file management format

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    26 : The ATA Card is nothing.

    data\eth_rddsm198dir

    Get the work folder for the M198 on DATA SERVER using Strage mode.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rddsm198dir(unsigned short FlibHndl, short path, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in Specify the channel number to set for the M198 on DATA SERVER.
    It is able to set from 1 to 10.
    dir out Set the work folder for the M198 on DATA SERVER using Strage mode.
    The Ascii string less than 256 characters which is included NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PATH The channel number(path) is worng.

    data\eth_rddsm198host

    Get the connected host number and work folder for the M198 on DATA SERVER using FTP mode.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rddsm198host(unsigned short FlibHndl, short path, short *host, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in Specify the channel number to set for the M198 on DATA SERVER.
    It is able to set from 1 to 10.
    host out Get the connected host number for the M198 on DATA SERVER using FTP mode.
    It is able to get the number from 1 to 3.
    dir out Get the work folder for the M198 on DATA SERVER using FTP mode.
    The Ascii string less than 256 characters which is included NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PATH The channel number(path) is worng.

    data\eth_rddsmode

    Get the all channel modes on DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rddsmode(unsigned short FlibHndl, OUT_ETHDSMODE *mode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode out Pointer to the OUT_ETHDSMODE structure to store the getting mode is specified.
    The IN_ETHPRM structure is as follows.
    typedef struct _out_ethdsmode {
        short               DsMode[10];
    } OUT_ETHDSMODE;
    
    DATA SERVER mode is as follows.
    0 : Nothing
    1 : Strage mode
    2 : Buffer mode
    3 : FTP mode

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.

    data\eth_rddsstate

    Get each path of maintenance information on DATA SERVER.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rddsstate(unsigned short FlibHndl, short path, OUT_DSSTATE *dsstate);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in Specify the channel number to set for the M198 on DATA SERVER.
    It is able to set from 1 to 10.
    dsstate out Pointer to the OUT_DSSTATE structure to store the getting maintenance information is specified.
    The OUT_DSSTATE structure is as follows.
    typedef struct _out_dsstate {
        short           DtsvrChannel;
        short           pad;
        short           Mode;
        unsigned short  EmptyCount;
        unsigned long   TotalSize;
        unsigned short  WritePtr;
        unsinged short  ReadPtr;
    } OUT_DSSTATE;
    
    DtsvrChannel
    Channel number on DATA SERVER
    Range 1,..,10
    pad
    This variable is unused.
    Mode
    Mode on DATA SERVER
    0 : Nothing
    1 : Strage mode
    2 : Buffer mode
    3 : FTP mode
    EmptyCount
    Empty buffer counts
    Range 0,..,65535
    TotalSize
    Total byte size of data transfer
    Range 0,..,65535
    WritePtr
    Write pointer
    Range 0,..,65535
    ReadPtr
    Read pointer
    Range 0,..,65535

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PATH The channel number(path) is worng.

    data\eth_rdhost

    Get the host number selected current Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rdhost(unsigned short FlibHndl, short type, short *host);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of communication function getting to the connected host.
    Kind of communication function is as follows.
    1 : Embedded Ethernet[Internal port]
    2 : Embedded Ethernet[PCMCIA LAN Card]
    3 : Fast Ethernet Board or Fast DATA SERVER Board
    4 : Windows CE Embedded Ethernet[Internal port]
    5 : Windows CE Embedded Ethernet[PCMCIA LAN Card]
    host out Specify the pointer to the variable by which the connecting host number of the Ethernet function is stored.
    Return from 1 to 3.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is nothing.
    21 : Windows CE Embedded Ethernet is nothing.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_FUNC Function Error
    Acquiring of parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    10 : Reading from File SRAM is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    3 : Kind of device error.

    data\eth_rdlog

    Get the max 15 message Log of Ethernt Function. : Embedded Ethernet[Internal Port,PCMCIA Card],Fast Ethernet Board,Fast DATA SERVER Board,Windows CE Embedded Ethernet[Internal Port, PCMCIA Card]


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rdlog(unsigned short FlibHndl, short type, short startMsgNumber short msgCount, OUT_ETHLOG *log);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of log to take out.
    The kind of log which can be taken out is as follows:
    Embedded Ethernet[Internal Port]
    0 : All
    1 : Common log
    2 : FOCAS2/Ethernet log
    3 : FTP Transfer log
    5 : Remote machine diagnose log
    6 : FACTOLINK log
    Embedded Ethernet[PCMCIA Card]
    20 : All
    21 : Common Log
    22 : FOCAS2/Ethernet log
    23 : FTP Transfer log
    25 : Remote machine diagnose log
    26 : FACTOLINK log
    Fast Ethernet Board or Fast DATA SERVER Board
    40 : All
    41 : Common log
    42 : FOCAS2/EthernetFunction log
    43 : FTP Transfer log
    45 : Remote machine diagnose log
    46 : FACTOLINK log
    Embedded Ethernet(WinCE)[Internal Port]
    60 : All
    61 : Common log
    62 : FOCAS2/EthernetFunction log
    63 : FTP Transfer log
    65 : Remote machine diagnose log
    66 : FACTOLINK log
    Embedded Ethernet(WinCE)[PCMCIA LAN Card]
    80 : All
    81 : Common log
    82 : FOCAS2/EthernetFunction log
    83 : FTP Transfer log
    85 : Remote machine diagnose log
    86 : FACTOLINK log
    startMsgNumber in

    First number of log message to take out

    The ethernet function has secured data which is 300 message in all.

    0 is latest log message. 299 is earliest log message.

    Range 0,..,299

    msgCount in

    Number of log message to take out

    Range 1,..,15

    log out

    Specify the pointer to the OUT_ETHLOG structure that stores getting log.

    The OUT_ETHLOG structure is as follows:

    typedef struct _out_ethlog {
        short               Count;
        char                reserve[14];
        OUT_ETHLOG1SHOT     logData[15];
    } OUT_ETHLOG;
    
    typedef struct _out_ethlog1shot {
        short           Type;
        unsigned short  MsgId;
        unsigned char   Year;
        unsigned char   Month;
        unsigned char   Day;
        unsigned char   Hour;
        unsigned char   Minute
        unsigned char   Second;
        char            reserve[2];
        char            Text[84];
    } OUT_ETHLOG1SHOT;
    
    log.Count
    Number of the taken out log message
    Range 0,..,20
    log.logData[n].Type
    The kind of taken out log
    log.logData[n].MsgId
    Fixation log message ID
    Range 0,..,65535
    In the case of 0(zero), Fixation log message does not exist.
    log.logData[n].Year
    The 3 figures under A.D. when the log occurred.
    Range AD2000,..,AD2255 : 0 ,..,255
    Ex) AD2003 : 3
    log.logData[n].Month
    The month when the log occurred.
    Range) 1,..,12
    Ex) January : 1
    log.logData[n].Day
    The day when the log occurred.
    Range 1,..,31
    Ex) thirty : 30
    log.logData[n].Hour
    The hour when the log occurred.(24-hour system)
    Range 0,..,23
    Ex) twenty one :21
    log.logData[n].Minute
    The minutes when the log occurred.
    Range 0,..,59
    Ex) three minute :3
    log.logData[n].Second
    The second when the log occurred.
    Range 0,..,59
    Ex) twenty second :20
    log.logData[n].Text
    Log Message
    When an effective string does not exist, head byte(log.logData[n].Text[0])is NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is nothing.
    21 : Windows CE Embedded Ethernet is nothing.
    22 : The option board is nothing.
    23 : Ethernet Function is nothing.
    24 : The DATA SERVER function is nothing.
    27 : FACTOLINK Function is nothing.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of data range
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    4 : Kind of log error.
    5 : Log number range error.
    6 : Log data count error

    data\eth_rdparam

    Get the parameters for Ethernet function : Fast Ethernet board, Fast DATA SERVER board


    PROTOTYPE

    FWLIBAPI short WINAPI eth_rdparam(unsigned short FlibHndl, short type, OUT_ETHPRM *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of to be received parameters.
    Kind of a parameter to be received is as follows.
    Embedded Ethernet[Internal port]
    1 : Common parameter
    2 : FOCAS2/Ethernet parameter
    3 : FTP Transfer parameter
    Embedded Ethernet[PCMCIA LAN Card]
    21 : Common parameter
    22 : FOCAS2/Ethernet parameter
    23 : FTP Transfer parameter
    Fast Ethernet board or Fast DATA SERVER board
    41 : Common parameter
    42 : FOCAS2/Ethernet parameter
    44 : DATA SERVER parameter
    param out Pointer to the OUT_ETHPRMFLAG structure that stored parameters received.
    The OUT_ETHPRMFLAG structure is as follows.
    typedef struct _out_ethprm {
        unsigned short  Option;
        short           Type;
        short           Dhcp;
        short           ValidDevice;
        short           DtsvrChannel;
        short           Storage;
        union {
            COMMON_PRM      common;
            FOCAS2_PRM      focas2;
            FTPTRANS_PRM    ftpTrans;
            DTSVR_PRM       dataServer;
    
    
    
        } prm;
    } OUT_ETHPRM;
    
    typedef struct _common_prm {
        char    OwnMacAddress[13];
        char    OwnIpAddress[40];
        char    SubNetmask[16];
        char    RouterIpAddress[40];
        char    DnsServer1IpAddress[40];
        char    DnsServer2IpAddress[40];
        char    OwnHostName[32];
        char    OwnDomain[63];
    } COMMON_PRM;   /* Common parameter */
    
    typedef struct _focas2_prm {
        unsigned long   TcpPort;
        unsigned long   UdpPort;
        unsigned long   TimeInterval;
    } FOCAS2_PRM;   /* Parameter for FOCAS2/Ethernet */
    
    typedef struct _ftptrans_prm {
        FTP_CLIENT_PRM  opposite[3];
    } FTPTRANS_PRM; /* Parameter for FTP transfer */
    
    typedef struct _dtsvr_prm {
        FTP_CLIENT_PRM  opposite[3];
        FTP_SERVER_PRM  own;
    } DTSVR_PRM;    /* Parameter for DATA SERVER */
    
    typedef struct _ftp_client_prm {
        char            HostName[64];
        unsigned long   ControlPort;
        unsigned long   Dummy;
        char            UserName[32];
        char            Password[32];
        char            LoginDirectory[128];
    } FTP_CLIENT_PRM;
    
    typedef struct _ftp_server_prm {
        char            UserName[32];
        char            Password[32];
        char            LoginDirectory[128];
    } FTP_SERVER_PRM
    
    
    
    Option
    Option
    bit 0 : Diplaying function is valid.
    bit 1 - bit 15 : reserve
    Type
    Kind of parameter received
    Dhcp
    Valid/Invalid flag for DHCP client
    0 : DHCP client is invalid.
    1 : DHCP client is valid.
    ValidDevice
    Valid device for Embedded Ethernet
    0 : None
    1 : Internal port
    2 : PCMCIA LAN Card
    4 : Internal port(WinCE)
    5 : PCMCIA LAN Card(WinCE)
    DtsvrChannel
    Valid channel number for DATA SERVER
    Range) 1 - 10
    Storage
    Storage used by DATA SERVER
    0 : None
    2 : ATA Card
    prm.common.OwnMacAddress
    MAC Address on CNC
    The Ascii string less than 13 characters which included NULL.
    Ex) "080019123456"
    prm.common.OwnIpAddress
    IP Address on CNC
    The Ascii string less than 40 characters which included NULL.
    Ex) "192.168.0.100"
    prm.common.SubNetmask
    Subnet mask
    The Ascii string less than 16 characters which included NULL.
    Ex) "255.255.255.0"
    prm.common.RouterIpAddress
    Router's IP Address
    The Ascii string less than 40 characters which included NULL.
    Ex) "192.168.0.253"
    prm.common.DnsServer1IpAddress
    Dns Server IP Address
    The Ascii string less than 40 characters which is included NULL.
    Ex) "192.168.0.252"
    prm.common.DnsServer2IpAddress
    Alternative Dns Server IP Address
    The Ascii string less than 40 characters which is included NULL.
    Ex) "192.168.0.251"
    prm.common.OwnHostName
    Host Name on CNC
    The Ascii string less than 32 characters which is included NULL.
    However, max size is 64 characters which add OwnHostName length to OwnDomain length.
    Ex) "cnc"
    prm.common.OwnDomain
    Domain name
    The Ascii string less than 63 characters which included NULL.
    However, maximum size is 64 characters which add OwnHostName length to OwnDomain length.
    Ex) "factory"
    prm.focas2.TcpPort
    Port number for TCP
    Used by FOCAS2/Ethernet
    Range 5001,..,65535 or 0
    Ex) 8193
    prm.focas2.UdpPort
    Port number for UDP
    Range 5001,..,65535 or 0
    Ex) 8192
    prm.focas2.TimeInterval
    Time interval which is transfered by broardcast frame (Unit:10ms)
    Range 10,..,65535 or 0
    Ex) 50
    prm.ftpTrans.opposite[n].HostName
    Host name or IP address which is assigned to FTP server.
    The Ascii string less than 64 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "ftp.factory" or "192.168.0.250"
    prm.ftpTrans.opposite[n].ControlPort
    Control port number which is assigned to FTP server.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Range 1,..,65535
    Ex) 21
    prm.ftpTrans.opposite[n].UserName
    User name to login the FTP server.
    The Ascii string less than 32 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user"
    prm.ftpTrans.opposite[n].Password
    Password to login the FTP server.
    Always string for "***" is always readable.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    prm.ftpTrans.opposite[n].LoginDirectory
    Folder name which is able to login the FTP server.
    The Ascii string less than 128 characters which is included NULL.
    n range 0,..,2
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "/ncdata"
    prm.dataServer.opposite[n].HostName
    Host name or IP address which is assigned to DATA SERVER.
    The Ascii string less than 64 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "ftp.factory" or "192.168.0.250"
    prm.dataServer.opposite[n].ControlPort
    Control port number which is assigned to DATA SERVER.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Range 1,..,65535
    Ex) 21
    prm.dataServer.opposite[n].UserName
    User name to login the DATA SERVER.
    The Ascii string less than 32 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user"
    prm.dataServer.opposite[n].Password
    Password which is assigned to DATA SERVER.
    Always string for "***" is gotten.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    prm.dataServer.opposite[n].LoginDirectory
    Folder name which can be able to login the DATA SERVER.
    The Ascii string less than 128 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "/ncdata"
    prm.dataServer.own.UserName
    User name which FTP client is able to login.
    The Ascii string less than 32 characters which is included NULL.
    Ex) "user"
    prm.dataServer.own.Password
    Password which FTP client is able to login.
    Always set "***" symbol.
    prm.dataServer.own.LoginDirectory
    Folder name which FTP client is able to login.
    The Ascii string less than 128 characters which is included NULL.
    Ex) "/ncdata"

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is not available.
    22 : The option board is not available.
    23 : Ethernet Function is not available.
    24 : The DATA SERVER function is not available.
    EW_FUNC Function Error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    10 : Reading from File SRAM is failed.
    12 : Reading from DHCP Server is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    1 : The kind(type) of parameter is wrong.

    data\eth_wrdsm198dir

    Set the work folder for the M198 on DATA SERVER using Strage mode.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_wrdsm198dir(unsigned short FlibHndl, short path, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in Specify the channel number to set for the M198 on DATA SERVER.
    It is able to set from 1 to 10.
    dir in Set the work folder for the M198 on DATA SERVER using Strage mode.
    The Ascii string less than 256 characters which is included NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PROT Write protection
    Writing to the parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    11 : Writing to the File SRAM is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : Out of string range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    303 : Folder name error.
    EW_PATH The channel number(path) is worng.

    data\eth_wrdsm198host

    Set the connected host number and work folder for the M198 on DATA SERVER using FTP mode.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_wrdsm198host(unsigned short FlibHndl, short path, short host, char *dir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in Specify the channel number to set for the M198 on DATA SERVER.
    It is able to set from 1 to 10.
    host in Set the connected host number for the M198 on DATA SERVER using FTP mode.
    It is able to set the number from 1 to 3.
    dir in Set the work folder for the M198 on DATA SERVER using FTP mode.
    The Ascii string less than 256 characters which included NULL.

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PROT Write protection
    Writing to the parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    11 : Writing to the File SRAM is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    1 : Out of string range.
    2 : Out of data range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    301 : Connected host number range error.
    303 : Folder name error.
    EW_PATH The channel number(path) is worng.

    data\eth_wrdsmode

    Change the mode for DATA SERVER function.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_wrdsmode(unsigned short FlibHndl, short path, short mode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path in

    Specify the channel number to change.

    It is able to change from 0 to 10.

    In case of setting 0(zero), all channel modes are changed.

    mode in Specify the DATA SERVER function mode to change.
    Available DATA SERVER function mode is as follows.
    1 : Strage mode
    2 : Buffer mode
    3 : FTP mode

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    25 : Buffer Mode Function is nothing.
    26 : The ATA Card is nothing.
    EW_FUNC Function Error
    Acquiring of parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    10 : Reading from File SRAM is failed.
    EW_PROT Write protection
    Writing to the parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    11 : Writing to the File SRAM is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    302 : Mode range error.
    EW_PATH The channel number(path) is worng.

    data\eth_wrhost

    Set the host number selected Ethernet function.


    PROTOTYPE

    FWLIBAPI short WINAPI eth_wrhost(unsigned short FlibHndl, short type, short host);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of communication function setting to the connected host.
    Kind of communication function is as follows.
    1 : Embedded Ethernet[Internal port]
    2 : Embedded Ethernet[PCMCIA LANCard]
    3 : Fast Ethernet Board or Fast DATA SERVER Board
    4 : Windows CE Embedded Ethernet[Internal port]
    5 : Windows CE Embedded Ethernet[PCMCIA LANCard]
    host in

    Set the host number(1,..,3) selected Ethernet function.


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is nothing.
    21 : Windows CE Embedded Ethernet is nothing.
    22 : The option board is nothing.
    24 : The DATA SERVER function is nothing.
    EW_PROT Writing to the parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    11 : Writing to the File SRAM is failed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of data range.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    3 : Kind of device error.
    301 : Connected host number range error.

    data\eth_wrparam

    Sets the parameters for Ethernet function : Fast Ethernet board, Fast DATA SERVER board


    PROTOTYPE

    FWLIBAPI short WINAPI eth_wrparam(unsigned short FlibHndl, short type, IN_ETHPRMFLAG *flag, IN_ETHPRM *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of parameters.
    Kind of parameter is as follows.
    Embedded Ethernet[Internal port]
    1 : Common parameter
    2 : FOCAS2/Ethernet parameter
    3 : FTP Transfer parameter
    Embedded Ethernet[PCMCIA LAN Card]
    21 : Common parameter
    22 : FOCAS2/Ethernet parameter
    23 : FTP Transfer parameter
    Fast Ethernet board or Fast DATA SERVER board
    41 : Common parameter
    42 : FOCAS2/Ethernet parameter
    44 : DATA SERVER parameter
    flag in Specify a pointer to the IN_ETHPRMFLAG structure for that marks an element of the setting parameters.
    The IN_ETHPRMFLAG structure is as follows.
    typedef struct _in_ethprm_flag {
        union {
            COMMON_PRM_FLG      common;
            FOCAS2_PRM_FLG      focas2;
            FTPTRANS_PRM_FLG    ftpTrans;
            DTSVR_PRM_FLG       dataServer;
    
    
    
        } flg;
    } IN_ETHPRMFLAG;
    
    typedef struct _common_prm_flg {
        char    OwnIpAddress;
        char    SubNetmask;
        char    RouterIpAddress;
        char    DnsServer1IpAddress;
        char    DnsServer2IpAddress;
        char    OwnHostName;
        char    OwnDomain;
    } COMMON_PRM_FLG;
    
    typedef struct _focas2_prm_flg {
        char    TcpPort;
        char    UdpPort;
        char    TimeInterval;
    } FOCAS2_PRM_FLG;
    
    typedef struct _ftptrans_prm_flg {
        FTP_CLIENT_PRM_FLG  opposite[3];
    } FTPTRANS_PRM_FLG;
    
    typedef struct _dtsvr_prm_flg {
        FTP_CLIENT_PRM_FLG  opposite[3];
        FTP_SERVER_PRM_FLG  own;
    } DTSVR_PRM_FLG;
    
    typedef struct _ftp_client_prm_flg {
        char    HostName;
        char    ControlPort;
        char    Dummy;
        char    UserName;
        char    Password;
        char    LoginDirectory;
    } FTP_CLIENT_PRM_FLG;
    
    typedef struct _ftp_server_prm_flg {
        char    UserName;
        char    Password;
        char    LoginDirectory;
    } FTP_SERVER_PRM_FLG;
    
    
    flg.common.OwnIpAddress
    flg.common.SubNetmask
    flg.common.RouterIpAddress
    flg.common.DnsServer1IpAddress
    flg.common.DncServer2IpAddress
    flg.common.OwnHostName
    flg.common.OwnDomain
    flg.focas2.TcpPort
    flg.focas2.UpdPort
    flg.focas2.TimeInterval
    flg.ftpTrans.opposite[n].HostName
    flg.ftpTrans.opposite[n].ControlPort
    flg.ftpTrans.opposite[n].UserName
    flg.ftpTrans.opposite[n].Password
    flg.ftpTrans.opposite[n].LoginDirectory
    flg.dataServer.opposite[n].HostName
    flg.dataServer.opposite[n].ControlPort
    flg.dataServer.opposite[n].UserName
    flg.dataServer.opposite[n].Password
    flg.dataServer.opposite[n].LoginDirectory
    flg.dataServer.own.UserName
    flg.dataServer.own.Password
    flg.dataServer.own.LoginDirectory
    Set a substitue value to 1. If that valuses are 0(zero), it is not able to set on the IN_ETHPRM structure.
    param in Specify a pointer to IN_ETHPRM structure to store the setting parameter.
    The IN_ETHPRM structure is as follows.
    typedef struct _in_ethprm {
        short   reserve01;
        short   reserve02;
        short   reserve03;
        short   reserve04;
        short   reserve05;
        short   reserve06;
        union {
            COMMON_PRM      common;
            FOCAS2_PRM      focas2;
            FTPTRANS_PRM    ftpTrans;
            DTSVR_PRM2      dataServer;
    
    
    
        } prm;
    } IN_ETHPRM;
    
    typedef struct _common_prm {
        char    OwnMacAddress[13];
        char    OwnIpAddress[40];
        char    SubNetmask[16];
        char    RouterIpAddress[40];
        char    DnsServer1IpAddress[40];
        char    DnsServer2IpAddress[40];
        char    OwnHostName[32];
        char    OwnDomain[63];
    } COMMON_PRM;   /* Common parameter */
    
    typedef struct _focas2_prm {
        unsigned long   TcpPort;
        unsigned long   UdpPort;
        unsigned long   TimeInterval;
    } FOCAS2_PRM;   /* Parameter for FOCAS2/Ethernet */
    
    typedef struct _ftptrans_prm {
        FTP_CLIENT_PRM  opposite[3];
    } FTPTRANS_PRM; /* Parameter for FTP transfer */
    
    typedef struct _dtsvr_prm {
        FTP_CLIENT_PRM  opposite[3];
        FTP_SERVER_PRM  own;
    } DTSVR_PRM;    /* Parameter for DATA SERVER */
    
    typedef struct _ftp_client_prm {
        char            HostName[64];
        unsigned long   ControlPort;
        unsigned long   Dummy;
        char            UserName[32];
        char            Password[32];
        char            LoginDirectory[128];
    } FTP_CLIENT_PRM;
    
    typedef struct _ftp_server_prm {
        char            UserName[32];
        char            Password[32];
        char            LoginDirectory[128];
    } FTP_SERVER_PRM
    
    
    reserve01,..,reserve06
    These variables are unable to use.
    The input values on these variables are ignored on this function.
    prm.common.OwnIpAddress
    IP Address
    The Ascii string less than 40 characters which is included NULL.
    Ex) "192.168.0.100"
    prm.common.SubNetmask
    Subnet mask
    The Ascii string less than 16 characters which is included NULL.
    Ex) "255.255.255.0"
    prm.common.RouterIpAddress
    Router's IP Address
    The Ascii string less than 40 characters which is included NULL.
    Ex) "192.168.0.253"
    prm.common.DnsServer1IpAddress
    Dns Server IP Address
    The Ascii string less than 40 characters which is included NULL.
    Ex) "192.168.0.252"
    prm.common.DnsServer2IpAddress
    Alternative Dns Server IP Address
    The Ascii string less than 40 characters whic ish included NULL.
    Ex) "192.168.0.251"
    prm.common.OwnHostName
    Host Name on CNC
    The Ascii string less than 32 characters which is included NULL.
    However, max size is 64 characters which is added OwnHostName length to OwnDomain length.
    Ex) "cnc"
    prm.common.OwnDomain
    Domain name
    The Ascii string less than 63 characters which is included NULL.
    However, max size is 64 characters which add OwnHostName length to OwnDomain length.
    Ex) "factory"
    prm.focas2.TcpPort
    Port number for TCP
    Used by FOCAS2/Ethernet
    Range 5001,..,65534 or 0
    Ex) 8193
    prm.focas2.UdpPort
    Port number for UDP
    Range 5001,..,65535 or 0
    Ex) 8192
    prm.focas2.TimeInterval
    Time interval which is transfered by broardcast frame (Unit:10ms)
    Range 10,..,65535 or 0
    Ex) 50
    prm.ftpTrans.opposite[n].HostName
    Host name or IP address which is assigned to FTP server.
    The Ascii string less than 64 characters which included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "ftp.factory" or "192.168.0.250"
    prm.ftpTrans.opposite[n].ControlPort
    Control port number which is assigned to FTP server.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Range 1,..,65535
    Ex) 21
    prm.ftpTrans.opposite[n].UserName
    User name to login the FTP server.
    The Ascii string less than 32 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user"
    prm.ftpTrans.opposite[n].Password
    Password to login the FTP server.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user1234"
    prm.ftpTrans.opposite[n].LoginDirectory
    Folder name which is able to login the FTP server.
    The Ascii string less than 128 characters which is included NULL.
    n range 0,..,2
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "/ncdata"
    prm.dataServer.opposite[n].HostName
    Host name or IP address which is assigned to DATA SERVER.
    The Ascii string less than 64 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "ftp.factory" or "192.168.0.250"
    prm.dataServer.opposite[n].ControlPort
    Control port number which is assigned to DATA SERVER.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Range 1,..,65535
    Ex) 21
    prm.dataServer.opposite[n].UserName
    User name to login the DATA SERVER.
    The Ascii string less than 32 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user"
    prm.dataServer.opposite[n].Password
    Password which is assigned to DATA SERVER.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "user1234"
    prm.dataServer.opposite[n].LoginDirectory
    Folder name which can be able to login the DATA SERVER.
    The Ascii string less than 128 characters which is included NULL.
    n range(0,..,2)
    0 : Connection one
    1 : Connection two
    2 : Connection three
    Ex) "/ncdata"
    prm.dataServer.own.UserName
    User name which FTP client is able to login.
    The Ascii string less than 32 characters which is included NULL.
    Ex) "user"
    prm.dataServer.own.Password
    Password which FTP client is able to login.
    The Ascii string less than 32 characters which is included NULL.
    Ex) "user1234"
    prm.dataServer.own.LoginDirectory
    Folder name which FTP client is able to login.
    The Ascii string less than 128 characters which is included NULL.
    Ex) "/ncdata"

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    20 : Embedded Ethernet is not available.
    22 : The option board is not available.
    23 : Ethernet Function is not available.
    24 : The DATA SERVER function is not available.
    25 : Buffer mode is not available.
    26 : ATA card is not found.
    EW_FUNC Function Error
    The acquisition of the parameter etc. is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    10 : Reading from File SRAM is failed.
    EW_PROT Protection Error
    The writing to the parameter is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    11 : Writing to File SRAM is failed.
    13 : The DHCP function is effective.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    2 : Out of range.
    3 : Data format error.
    The following details status will be set onto the member, err_dtno of ODBERR structure.
    1 : The kind(type) of parameter is wrong.
    101 : prm.common.OwnIpAddress is wrong.
    102 : prm.common.SubNetmask is wrong.
    103 : prm.common.RouterIpAddress is wrong.
    104 : prm.common.DnsServer1IpAddress is wrong.
    105 : prm.common.DnsServer2IpAddress is wrong.
    106 : prm.common.OwnHostName is wrong.
    107 : prm.common.OwnDomain is wrong.
    201 : prm.focas2.TcpPort is wrong.
    202 : prm.focas2.UdpPort is wrong.
    203 : prm.focas2.TimeInterval is wrong.
    301 : The range of host number is wrong.
    302 : DATA SERVER mode is wrong.
    3[i+1]1 : prm.dataServer.opposite[i].HostName is wrong.
    In case of i=0
    311:The meaning of prm.dataServer.opposite[0](i=0-2)
    3[i+1]2 : prm.dataServer.opposite[i].ControlPort is wrong.
    3[i+1]3 : prm.dataServer.opposite[i].Dummy is wrong.
    3[i+1]4 : prm.dataServer.opposite[i].UserName is wrong.
    3[i+1]5 : prm.dataServer.opposite[i].Password is wrong.
    3[i+1]6 : prm.dataServer.opposite[i].LoginDirectory is wrong.
    344 : prm.dataServer.own.UserName is wrong.
    345 : prm.dataServer.own.Password is wrong.
    346 : prm.dataServer.own.LoginDirectory is wrong.
    3[i+5]1 : prm.ftpTrans.opposite[i].HostName is wrong.
    In case of i=0
    351:The meaning of prm.ftpTrans.opposite[0](i=0-2)
    3[i+5]2 : prm.ftpTrans.opposite[i].ControlPort is wrong.
    3[i+5]3 : prm.ftpTrans.opposite[i].Dummy is worng.
    3[i+5]4 : prm.ftpTrans.opposite[i].UserName is wrong.
    3[i+5]5 : prm.ftpTrans.opposite[i].Password is wrong.
    3[i+5]6 : prm.ftpTrans.opposite[i].LoginDirectory is wrong.

    handle\cnc_allclibhndl

    Allocates the library handle which is used by the Data window library.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_allclibhndl(unsigned short *FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl out

    Pointer to the variable to which the library handle will be stored.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_HSSB Communication error on HSSB
    Check the power supply of CNC, HSSB I/F board, HSSB connection cable.
    EW_HANDLE Acquiring of handle is faild.
    EW_BUSY Initialization between MMC function and CNC/PMC is in progress
    Retry this function until the initialization completes.

    handle\cnc_allclibhndl2

    Allocates the library handle to the specified node number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_allclibhndl2( long node_no, unsigned short *FlibHndl );


    ARGUMENTS

    Name Direction Description
    FlibHndl out

    Pointer to the variable to which the library handle will be stored.
    See Library handle for details.

    node_no in

    Specify the node number. (0,..,<maximum node number>)
    Maximum node number is 'the number of node - 1'.
    (The number of node is got by using cnc_rdnodenum function.)


    ERRORS

    Code Description
    EW_NODLL There is no DLL file for each CNC series corresponding to specified node.
    EW_HSSB Communication error on HSSB
    Check the power supply of CNC, HSSB I/F board, HSSB connection cable.
    EW_HANDLE Allocation of handle number is failed.
    EW_MMCSYS Access failure to the device driver
    The device driver for HSSB multi-connection is not installed.
    EW_BUSY Initialization between MMC function and CNC/PMC is in progress
    Retry this function until the initialization completes.
    EW_NUMBER Node number(node_no) is wrong.

    handle\cnc_allclibhndl3

    Allocates the library handle and connects to CNC that has the specified IP address or the Host Name.

    Before executing this function, set the IP address and the port number of the FOCAS1/Ethernet (TCP) or FOCAS2/Ethernet (TCP) function on the CNC side correctly.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_allclibhndl3(const char *ipaddr, unsigned short port, long timeout, unsigned short *FlibHndl);


    ARGUMENTS

    Name Direction Description
    ipaddr in

    Specify character string of CNC's IP address or Host Name to connect.
    (Ex. "192.168.0.1" or "CNC-1.FACTORY")

    port in

    Specify port number of the FOCAS1/Ethernet or FOCAS2/Ethernet (TCP) function.

    timeout in Specify seconds for timeout. If specify 0, timeout process is ignored and the library functions wait infinity.

    The best timeout value is different according as system. For example, in case of the hi-speed network system, 10 seconds is sufficient for timeout. But in case of relaying by low-speed telephone line, more than 60 seconds is well for timeout. So you must specify the timeout value after the measurement of your communication time.
    FlibHndl out

    Specify pointer to variable including the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_SOCKET Socket communication error
    Check the power supply of CNC, Ethernet I/F board, Ethernet connection cable.
    EW_NODLL There is no DLL file for each CNC series
    EW_HANDLE Allocation of handle number is failed.

    handle\cnc_allclibhndls

    Allocates the library handle and connects to CNC that has the specified IP address or the Host Name.

    Before executing this function, set the IP address and the port number of the FOCAS1/Ethernet (TCP) or FOCAS2/Ethernet (TCP) function on the CNC side correctly.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_allclibhndls(const char *ipaddr, unsigned short port, char *accesscode, long timeout, unsigned short *FlibHndl);


    ARGUMENTS

    Name Direction Description
    ipaddr in

    Specify character string of CNC's IP address or Host Name to connect.
    (Ex. "192.168.0.1" or "CNC-1.FACTORY")

    port in

    Specify port number of the FOCAS1/Ethernet or FOCAS2/Ethernet (TCP) function.

    accesscode in

    Access code

    The "access code" set in CNC are eight figures or less.
    However, in this function, it specifies it by not the number but the character string.
    So, specify the character string "123456" or "00123456" for this argument when you set 123456 to the parameter of CNC.
    The character string is terminated with NULL character (‘\0’).
    timeout in Specify seconds for timeout. If specify 0, timeout process is ignored and the library functions wait infinity.

    The best timeout value is different according as system. For example, in case of the hi-speed network system, 10 seconds is sufficient for timeout. But in case of relaying by low-speed telephone line, more than 60 seconds is well for timeout. So you must specify the timeout value after the measurement of your communication time.
    FlibHndl out

    Specify pointer to variable including the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_SOCKET Socket communication error
    Check the power supply of CNC, Ethernet I/F board, Ethernet connection cable.
    EW_NODLL There is no DLL file for each CNC series
    EW_HANDLE Allocation of handle number is failed.
    EW_DATA The access code is illegal.
    EW_PROT Access code disagreement

    handle\cnc_freelibhndl

    Frees the library handle which was used by the Data window library.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_freelibhndl(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description

    handle\cnc_getlibopt

    Reads the current status of FOCAS2 library's optional specifications.

    The readable options are as follows.

    Value(optname) Type Default Meaning
    LIB_MODE(0) long 0 Gets the advanced mode(0) or the traditional mode(1).
    MOVE_RDPRGPTR(1) long 1 Gets if the execution pointer would be moved(1) or not moved(0) after invoking cnc_rdpdf_line function.

    (As for the advanced/traditional mode, see "FS16i compatible mode")


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getlibopt( unsigned short FlibHndl, long optname, const char *optval, long *optlen);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    optname in

    Specify the kind of the option to be stored.

    optval out

    Specify the pointer to the buffer to be stored the data.

    optlen in/out

    Specify the pointer to the variable which shows the number of bytes to be stored. Set the number of bytes to be read to this variable (*optlen). After reading, the number of bytes actually read is set in this variable(*optlen).


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size(optlen) is wrong.
    EW_ATTRIB Data attribute error
    Kind of the option(optname) is wrong.

    handle\cnc_rdnodeinfo

    Reads the specified node information of the HSSB.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdnodeinfo( long node_no, ODBNODE *info );


    ARGUMENTS

    Name Direction Description
    node_no in

    Specify the node number. (0,..,<maximum node number>)
    Maximum node number is 'the number of node - 1'.
    (The number of node is got by using cnc_rdnodenum function.)

    info out

    Pointer to the ODBNODE structure including the node information.

    The ODBNODE structure is as follows.

    typedef struct odbnode {
        long  node_no;      /* Node number */
        long  io_base;      /* Base address of I/O port */
        long  status;       /* Status of device installation */
        long  cnc_type;     /* Type of CNC */
        char  node_name[20];/* Node name */
    } ODBNODE;
      node_no
      Specified node number is set.
      io_base
      Base address of I/O port of specified node is set.
      status
      Status of device installation of specified node is set.
      0 : Not installed
      1 : Installed
      cnc_type
      Type of CNC is set.
      1 : Series 16/18/21, 16i/18i/21i
      2 : Series 15
      3 : Power Mate
      4 : Power Mate i
      5 : Series 16i/18i-W
      6 : Series 15i
      7 : Series 0i-A
      8 : Series 0i-B
      9 : Series 30i/31i/32i, Series 0i-D/F, PMi-A
      node_name[20]
      Node name is set.
      Node name is up to 20 characters including 'NULL'.

    ERRORS

    Code Description
    EW_MMCSYS Access failure to the device driver
    The device driver for HSSB multi-connection is not installed.
    EW_NUMBER Node number(node_no) is wrong.

    handle\cnc_rdnodenum

    Reads the number of node of the HSSB.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdnodenum( long *node_num );


    ARGUMENTS

    Name Direction Description
    node_num out

    Pointer to the variable for the number of node.


    ERRORS

    Code Description
    EW_MMCSYS Access failure to the device driver
    The device driver for HSSB multi-connection is not installed.

    handle\cnc_setdefnode

    Sets the default node number which is allocated by cnc_allclibhndl function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setdefnode( long node_no );


    ARGUMENTS

    Name Direction Description
    node_no in

    Specify the default node number.


    ERRORS

    Code Description
    EW_MMCSYS Access failure to the device driver
    The device driver for HSSB multi-connection is not installed.
    EW_NUMBER Node number(node_no) is wrong.

    handle\cnc_setlibopt

    Changes FOCAS2 library's optional specifications dynamically.

    The changeable options are as follows.

    Value(optname) Type Default Meaning
    LIB_MODE(0) long 0 Changes the advanced mode(0) or the traditional mode(1).
    MOVE_RDPRGPTR(1) long 1 Changes if the execution pointer would be moved(1) or not moved(0) after invoking cnc_rdpdf_line function.

    (As for the advanced/traditional mode, see "FS16i compatible mode")


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setlibopt( unsigned short FlibHndl, long optname, const char *optval, long optlen);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    optname in

    Specify the kind of the option to be set.

    optval in

    Specify the pointer to data to be set.

    optlen in

    Specify the bytes size of the data(*optval) to be set.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size(optlen) is wrong.
    EW_ATTRIB Data attribute error
    Kind of the option(optname) is wrong.
    EW_DATA Data error
    Data of the option(*optval) is out of range.

    handle\cnc_settimeout

    Changes timeout value, which is specified at allocating the library handle.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_settimeout(unsigned short FlibHndl, long timeout);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    timeout in

    Specify seconds for timeout. If specify 0, timeout process is ignored and the library functions wait infinity.


    ERRORS

    Code Description

    history\cnc_clearomhis

    Clears the external operator's message history data.

    The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_clearophis( Argument "slct=2" ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clearomhis(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2', '3113#0' must be 1.(Series 16/18/21, 16i/18i/21i, 0i-A/B/C)
    3195#7=1 (Series 30i, 0i-D/F, PMi-A).

    history\cnc_clearophis

    Clears the operation history data and the alarm history data. At Series 30i 0i-D/F and PMi-A, the external operator's message history data are also cleared.

    • Series 15/15i

    • both the operation history and the alarm history are cleared once.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i

    • It is possible to select the clearing of the operation history or the alarm history by setting "slct"

    • Series 30i, 0i-D/F, PMi-A
    • The history data cleared by setting "slct" can be selected.
      The 3 kinds data, that is, the operation history, the alarm history, and the external operator message history can be cleared.

      Please use cnc_clearomhis function instead of this for other series.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clearophis(unsigned short FlibHndl, short slct);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct in

    Specify the kind of the cleared history data.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • 0 : the opeation history data
      1 : the alarm history data
    • Series 30i, 0i-D/F, PMi-A
    • The cleared history data is different according to setting parameter SAH (No.11354#2) and the SOH (No.11354#3).
      Refer to the following table.
      In case of 0i-D/F, the history data in the path specified by the cnc_setpath is cleared.

      O : cleared. - : not cleared.
      SAH SOH slct operation history alarm history message history
      0 0 0 O O O
      1 O O O
      2 O O O
      1 0 0 O - O
      1 - O -
      2 O - O
      0 1 0 O O -
      1 O O -
      2 - - O
      1 1 0 O - -
      1 - O -
      2 - - O

    The cleared history data is different according to setting parameter SAH (No.11354#2) and the SOH (No.11354#3).
    Refer to the following table.

    O : cleared. - : not cleared.

    SAH SOH slct operation history alarm history message history
    0 0 0 O O O
    1 O O O
    2 O O O
    1 0 0 O - O
    1 - O -
    2 O - O
    0 1 0 O O -
    1 O O -
    2 - - O
    1 1 0 O - -
    1 - O -
    2 - - O


    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of "kind of the cleared history data" (slct) is wrong.
    EW_PARAM CNC parameter error
    CNC parameter should be as follows.
    0015#4=1 (Series 15/15i)
    3112#5=0 (Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    3195#7=1 (Series 30i, 0i-D/F, PMi-A)
    3110#4=1, 3112#5=1 (Series 16i/18i-W)
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdalmhisno

    Reads the number of alarm history data.

    It is necessary to stop sampling the alarm history data by using cnc_stopophis function before this function is used.

    In case of Series 30i, 0i-D/F and PMi-A the data number of all path is acquired. (In case of other CNC, the data number in the path specified by the cnc_setpath is acquired.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhisno(unsigned short FlibHndl, unsigned short *hisno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hisno out

    Pointer to the variable in which the number of alarm history data is stored.


    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_NOOPT No option
    The extended driver/library function are necessary.

    history\cnc_rdalmhistry

    Reads the alarm history data. The unit of one alarm history data is called a record.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    This function cannot be used for Series 15i, so use cnc_rdalmhistry2 function instead of cnc_rdalmhistry function.

    The alarm history data is acquired in old order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhistry(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in

    Specify the end record number.(more than 1)

    length in

    Specify the data block length(size of ODBAHIS structure).


    his out

    Pointer to the ODBAHIS structure in which the alarm history data is stored. The ODBAHIS structure is as follows.

    typedef struct odbahis {
        unsigned short s_no;       /* Start record number      */
        short          type;       /* Not used                 */
        unsigned short e_no;       /* Most recently entered    */
                                   /* record number            */
        struct {
            short      dummy;       /* Not used            */
            short      alm_grp;     /* Alarm type          */
            short      alm_no;      /* Alarm number        */
            char       axis_no;     /* Axis number         */
            char       year;        /* Year                */
            char       month;       /* Month               */
            char       day;         /* Day                 */
            char       hour;        /* Hour                */
            char       minute;      /* Minute              */
            char       second;      /* Second              */
            char       dummy2;      /* Not used            */
            short      len_msg;     /* Length of alarm     */
                                    /* message             */
            char       alm_msg[32]; /* Alarm message       */
        } alm_his[N];   /* N : Number of record */
    } ODBAHIS ;
    
    alm_grp
    Alarm type (only Series 15)
      bit 0 : Background P/S (BG)
      bit 1 : Foreground P/S (PS)
      bit 2 : Over heat alarm (OH)
      bit 3 : Sub-CPU error (SB)
      bit 4 : Synchronized error (SN)
      bit 5 : Parameter switch on (SW)
      bit 6 : Over travel, external data (OT)
      bit 7 : PMC error (PC)
      bit 8 : External alarm message (EX)
      bit 9 : (Not used)
      bit 10 : Serious P/S (SR)
      bit 11 : (Not used)
      bit 12 : Servo alarm (SV)
      bit 13 : I/O error (IO)
      bit 14 : Power off parameter set (PW)
      bit 15 : (Not used)
    alm_no
    Alarm number
    Macro alarm : bit15=1(only Series 15)
    axis_no
    Axis number(from 1 to maximum controlled axis)
    It is unused for an unrelated alarm to the axis.
    year
    Year (0,..,99)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    len_msg
    Length of alarm message (0,..,32)
    alm_msg
    Alarm message

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBAHIS structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 6 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdalmhistry2

    Reads the alarm history data. Please use this function instead of cnc_rdalmhistry for Series 15i.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The unit of one alarm history data is called a record. The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    This function cannot be used for Series 16/18/21, 16i/18i/21i, 0i and Power Mate i, so use cnc_rdalmhistry function instead of cnc_rdalmhistry function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhistry2(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS2 *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in

    Specify the end record number.(more than 1)

    length in

    Specify the data block length(size of ODBAHIS2 structure).
    ODBAHIS2


    his out

    Pointer to the ODBAHIS2 structure in which the alarm history data is stored. The ODBAHIS2 structure is as follows.

    typedef struct odbahis2 {
        unsigned short  s_no;       /* Start record number   */
        unsigned short  e_no;       /* Most recently entered */
                                    /* record number         */
        struct {
            short   alm_grp;        /* Alarm type            */
            short   alm_no;         /* Alarm number          */
            short   axis_no;        /* Axis number           */
            short   year;           /* Year                  */
            short   month;          /* Month                 */
            short   day;            /* Day                   */
            short   hour;           /* Hour                  */
            short   minute;         /* Minute                */
            short   second;         /* Second                */
            short   len_msg;        /* Length of alarm       */
                                    /* messafe               */
            char    alm_msg[32];    /* Alarm message         */
        } alm_his[N];       /* N : Number of record */
    } ODBAHIS2 ;
    
    alm_grp
    Alarm type
    • Series 15i
    0 : Background P/S (BG)
    1 : Foreground P/S (PS)
    2 : (Not used)
    3 : (Not used)
    4 : Syncronized error (SN)
    5 : Parameter switch on (SW)
    6 : Over travel, External data (OT)
    7 : PMC error (PC)
    8 : External alarm message (EX)
    9 : (Not used)
    10 : Serious P/S (SR)
    11 : (Not used)
    12 : Servo alarm (SV)
    13 : I/O error (IO)
    14 : Power off parameter set (PW)
    15 : System alarm (SY)
    16 : External alarm message (2) (EX)
    17 : External alarm message (3) (EX)
    18 : External alarm message (4) (EX)
    19 : Macro alarm (MC)
    20 : Spindle alarm (SP)
    alm_no
    Alarm number
    axis_no
    Axis number(from 1 to maximum controlled axis) or Spindle number(from 1 to maximum spindle number)
    0 is stored for an unrelated alarm to the axis and the spindle.
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,.,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    len_msg
    Length of alarm message (0,..,32)
    alm_msg
    Alarm message

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBAHIS2 structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 4 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdalmhistry3

    Reads the alarm history data. The unit of one alarm history data is called a record.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    The alarm history data is acquired in old order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhistry3(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBAHIS3 *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number. (specify 1 or more.)

    e_no in

    Specify the end record number. (specify 1 or more.)

    length in

    Specify the data block length. (size of ODBAHIS3 structure)


    his out

    Pointer to the ODBAHIS3 structure in which the alarm history data is stored. The ODBAHIS3 structure is as follows.

    typedef struct odbahis3 {
        unsigned short s_no;        /* Start record number      */
        short          type;        /* Not used                 */
        unsigned short e_no;        /* Most recently entered    */
                                    /* record number            */
        struct {
            short      dummy;       /* Not used            */
            short      alm_grp;     /* Alarm type          */
            short      alm_no;      /* Alarm number        */
            char       axis_no;     /* Axis number         */
            char       year;        /* Year                */
            char       month;       /* Month               */
            char       day;         /* Day                 */
            char       hour;        /* Hour                */
            char       minute;      /* Minute              */
            char       second;      /* Second              */
            char       dummy2;      /* Not used            */
            short      len_msg;     /* Length of alarm     */
                                    /* messafe             */
            char       alm_msg[36]; /* Alarm message       */
        } alm_his[N];   /* N : Number of record */
    } ODBAHIS3 ;
    
    alm_grp
    unused
    alm_no
    Alarm number
    axis_no
    Axis number (1 - maximum axis control number) It is unused for an unrelated alarm to the axis.
    year
    Year (0,..,99)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minite (0,..,59)
    second
    Second (0,..,59)
    len_msg
    Number of characters of alarm message (0 - 33)
    alm_msg
    Message string

    ERRORS

    Code Description
    EW_FUNC Unavailable
    cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBAHIS3 structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 6 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option

    history\cnc_rdalmhistry4

    Reads the alarm history data.

    Please use this function instead of cnc_rdalmhistry for Series 30i.

    The unit of one alarm history data is called a record.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    The alarm history data is acquired in old order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhistry4(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length,ODBAHIS4 *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number. (specify 1 or more.)

    e_no in

    Specify the end record number. (specify 1 or more.)

    length in

    Specify the data block length. (size of ODBAHIS4 structure)


    his out

    Pointer to the ODBAHIS4 structure in which the alarm history data is stored. The ODBAHIS4 structure is as follows.

    typedef struct odbahis4 {
        unsigned short  s_no;       /* Start record number     */
        unsigned short  e_no;       /* Most recently entered   */
        struct {
            short   alm_grp;        /* Alarm type              */
            short   alm_no;         /* Alarm number            */
            short   axis_no;        /* Axis number             */
            short   year;           /* Year                    */
            short   month;          /* Month                   */
            short   day;            /* Day                     */
            short   hour;           /* Hour                    */
            short   minute;         /* Minute                  */
            short   second;         /* Second                  */
            short   len_msg;        /* Length of alarm message */
            short   pth_no;         /* path number             */
            short   dummy;
            char    alm_msg[64];    /* alarm message           */
        } alm_his[N];               /* N : number of alarm history data to be read */
    } ODBAHIS4 ;
    
    alm_grp
    Alarm type
    0 : Parameter switch on (SW)
    1 : Power off parameter set (PW)
    2 : I/O error (IO)
    3 : Foreground P/S (PS)
    4 : Overtravel,External data (OT)
    5 : Overheat alarm (OH)
    6 : Servo alarm (SV)
    7 : Data I/O error (SR)
    8 : Macro alarm (MC)
    9 : Spindle alarm (SP)
    10 : Other alarm(DS) (DS)
    11 : Alarm concerning Malfunction prevent functions (IE)
    12 : Background P/S (BG)
    13 : Syncronized error (SN)
    14 : (reserved)
    15 : External alarm message (EX)
    16 : (reserved)
    17 : (reserved)
    18 : (reserved)
    19 : PMC error (PC)
    20 to 31 : (Not used)
    alm_no
    Alarm number
    axis_no
    Axis number(from 1 to maximum controlled axis) or Spindle number(from 1 to maximum spindle number)
    0 is stored for an unrelated alarm to the axis and the spindle.
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59))
    len_msg
    Length of alarm message (0,..,64)
    pth_no
    path number(0,..,9)
    alm_msg
    Alarm message

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBAHIS4 structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 4 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdalmhistry5

    Reads the alarm history data.

    Please use this function instead of cnc_rdalmhistry for Series 30i, 0i-D/F and PMi-A.

    The unit of one alarm history data is called a record.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    In case of 0i-D, the alarm history data in the path specified by the cnc_setpath is acquired.

    The alarm history data is acquired in old order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmhistry5(unsigned short FlibHndl, unsigned short s_no,unsigned short e_no,unsigned short length,ODBAHIS5 *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number. (specify 1 or more.)

    e_no in

    Specify the end record number. (specify 1 or more.)

    length in

    Specify the data block length. (size of ODBAHIS5 structure)


    his out

    Pointer to the ODBAHIS5 structure in which the alarm history data is stored. The ODBAHIS5 structure is as follows.

    typedef struct odbahis5 {
        unsigned short  s_no;       /* Start record number     */
        unsigned short  e_no;       /* Most recently entered   */
        struct {
            short   alm_grp;        /* Alarm type              */
            short   alm_no;         /* Alarm number            */
            short   axis_no;        /* Axis number or Spindle number */
            short   year;           /* Year                    */
            short   month;          /* Month                   */
            short   day;            /* Day                     */
            short   hour;           /* Hour                    */
            short   minute;         /* Minute                  */
            short   second;         /* Second                  */
            short   len_msg;        /* Length of alarm message */
            short   pth_no;         /* path number             */
            short   dammy;
            short   dsp_flg;        /* Flag for displaying */
            short   axis_num;       /* Total axis number */
            char    alm_msg[64];    /* Alarm message           */
            long    g_modal[10];    /* Modal data of G code */
            char    g_dp[10];       /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
            long    a_modal[10];    /* Modal data of B,D,E,F,H,M,N,O,S,T code */
            char    a_dp[10];       /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
            long    abs_pos[32];    /* Absolute position in alarm occuring */
            char    abs_dp[32];     /* Place of decimal point for absolute position in alarm occuring */
            long    mcn_pos[32];    /* Machine position in alarm occuring */
            char    mcn_dp[32];     /* Place of decimal point for machine position in alarm occuring */
        } alm_his[N];               /* N : number of alarm history data to be read  */
    } ODBAHIS5 ;
    
    alm_grp
    Alarm type
    0 : Parameter switch on (SW)
    1 : Power off parameter set (PW)
    2 : I/O error (IO)
    3 : Foreground P/S (PS)
    4 : Overtravel,External data (OT)
    5 : Overheat alarm (OH)
    6 : Servo alarm (SV)
    7 : Data I/O error (SR)
    8 : Macro alarm (MC)
    9 : Spindle alarm (SP)
    10 : Other alarm(DS) (DS)
    11 : Alarm concerning Malfunction prevent functions (IE)
    12 : Background P/S (BG)
    13 : Syncronized error (SN)
    14 : (reserved)
    15 : External alarm message (EX)
    19 : PMC error (PC)
    20 to 31 : (Not used)
    alm_no
    Alarm number
    axis_no
    The relative axis number(1,..,max controlled axes) in the path or the relative spindle number(1,..,max spindle number) in the path is set in this variable.
    When the flexible path axis assignment function is valid, the absolute axis number + 1000(1001,..,max controlled axis number + 1000) or the relative spindle number(1,..,max spindle number) in the path is set in this variable.
    (Absolute axis number or absolute spindle number 0 is stored for an unrelated alarm to the axis and the spindle.)
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    len_msg
    Length of alarm message (0,..,64)
    pth_no
    path number(1,..,10)
    dsp_flg
    Flag for message displaying
    In case of the Macro alarm(alm_grp=8), the state of 6008#1 can be acquired.
    In case of the External alarm message(alm_grp=15), the state of 6301#0 can be acquired.
    In case of the External operator's message, the state of 6301#1 can be acquired.
    (* The status of a point at alarm occurring can get.
    axis_num
    Total axis number(0,..,32)(0:axis_num is invalid.)
    alm_msg
    Alarm message
    g_modal
    Modal G code of specified G code group at alarm occurring (nonexistence -1)
    Modal G code group number is specified by the parameter from No.12990 to No.12999.
    g_dp
    #7=1 There is a command in the present block.(nonexistence -1)
    #6〜#0 place of decimal point

    #7=0 There is not a command in the present block.
        =1 There is a command in the present block.
    a_modal
    Modal data of 2nd auxiliary function(prm3460),D,E,F,H,M,N,O,S,T code in alarm occuring(nonexistence -1)
         a_modal[0] ,a_dp[0]=2nd auxiliary function code ,a_modal[1] ,a_dp[1]=D code
         a_modal[2] ,a_dp[2]=E code ,a_modal[3] ,a_dp[3]=F code
         a_modal[4] ,a_dp[2]=H code ,a_modal[5] ,a_dp[3]=M code
         a_modal[6] ,a_dp[2]=N code ,a_modal[7] ,a_dp[3]=O code
         a_modal[8] ,a_dp[2]=S code ,a_modal[9] ,a_dp[3]=T code
        *In case of 'O' code, specify 5 charactors of head.
    a_dp
    #7=1 There is a command in the present block.(nonexistence -1)
    #6〜#0 place of decimal point

    #7=0 There is not a command in the present block.
        =1 There is a command in the present block.
    abs_pos
    Absolute position in alarm occuring
    abs_dp
    Absolute position place of decimal point in alarm occuring
    mcn_pos
    Machine position in alarm occuring
    mcn_dp
    Machine position place of decimal point in alarm occuring
    *More than axis number is unused.

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBAHIS4 structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 4 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdhissgnl

    Reads the target signal for the operation history.
    Please use cnc_rdhissgnl2 instead of this function for Series 16i/18i/21i MODEL B with the extended operation history function.
    And please use cnc_rdhissgnl3 function for Series 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhissgnl(unsigned short FlibHndl, IODBSIG *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig out

    Pointer to the IODBSIG structure in which the operation history signal is stored. The IODBSIG structure is as follows.

    typedef struct iodbsig {
        short      datano;   /* Not used */
        short      type;     /* Not used */
        struct {
            short   ent_no;   /* Registration sequence number   */
            short   sig_no;   /* Registered signal number       */
            char    sig_name; /* Registered signal name         */
            char    mask_pat; /* Signal mask pattern            */
        } data[20];
    } IODBSIG ;
    
    ent_no
    Registration sequence number (1~20)
    sig_no
    Number of a registered signal
    • Series 15/15i
    • X : 0~127
      G : 0~511
      Y : 0~127
      F : 0~511
    • Series 16/18/21, 16i/18i/21i, 0i, Power Mate i
    • X : 0~127 or 1000~1063
      G : 0~255 or 1000~1255 or 2000~2255
      Y : 0~127 or 1000~1063
      F : 0~255 or 1000~1255 or 2000~2255
    sig_name
    Name of a registered signal
    0 : Not registered
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    This value is returned when the extended operation history function is exist at Series 16i/18i/21i MODEL B.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdhissgnl2

    Reads the target signal for the operation history.
    Please use this function instead of cnc_rdhissgnl for Series 16i/18i/21i MODEL B with the extended operation history function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhissgnl2(unsigned short FlibHndl, IODBSIG2 *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig out

    Pointer to the IODBSIG2 structure in which the operation history signal is stored. The IODBSIG2 structure is as follows.

    typedef struct iodbsig2 {
        short      datano;   /* Not used */
        short      type;     /* Number of signals */
        struct {
            short   ent_no;   /* Registration sequence number   */
            short   sig_no;   /* Registered signal number       */
            char    sig_name; /* Registered signal name         */
            char    mask_pat; /* Signal mask pattern            */
        } data[45];
    } IODBSIG2 ;
    
    type
    Number of signals can be registration
    • Series 16i/18i/21i MODEL B, when the extended operation history function exists
    • 45 is returned. Whole of data[0]~data[44] are effective.
    • Other cases
    • 20 is returned. Only data[0]~data[19] are effective.
    ent_no
    Registration sequence number (from 1 to value of the type)
    sig_no
    Number of a registered signal
    • Series 16i/18i/21i MODEL B, when the extended operation history function exists (the type equals to 45)
    • X : 0~127 or 200~327 or 1000~1063
      G : 0~511 or 1000~1511 or 2000~2511
      Y : 0~127 or 200~327 or 1000~1063
      F : 0~511 or 1000~1511 or 2000~2511
    • Other cases (the type equals to 20)
    • X : 0~127 or 1000~1063
      G : 0~255 or 1000~1255 or 2000~2255
      Y : 0~127 or 1000~1063
      F : 0~255 or 1000~1255 or 2000~2255
    sig_name
    Name of a registered signal
    0 : Not registered
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdhissgnl3

    Reads the target signal for the operation history.
    Please use this function instead of cnc_rdhissgnl for Series 30i, 0i-D/F and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhissgnl3(unsigned short FlibHndl, IODBSIG3 *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig out

    Pointer to the IODBSIG3 structure in which the operation history signal is stored. The IODBSIG3 structure is as follows.

    typedef struct iodbsig3 {
        short      datano;   /* Not used */
        short      type;     /* Not used */
        struct {
            short   ent_no;   /* Registration sequence number */
            short   pmc_no;   /* PMC number                   */
            short   sig_no;   /* Registered signal number     */
            char    sig_name; /* Registered signal name       */
            char    mask_pat; /* Signal mask pattern          */
        } data[60];
    } IODBSIG3 ;
    
    ent_no
    Registration sequence number (1-60)
    pmc_no
    PMC number (1,2,3)
    sig_no
    Number of a registered signal
    X : 0~127
    G : 0~767
    Y : 0~127
    F : 0~767
    sig_name
    Name of a registered signal
    0 : Not registered
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdomhisinfo

    Reads the maximum number, current number and maximum string length of external operator's message history data.

    It is necessary to stop logging the external operator's message history data by using cnc_stopomhis function before this function is used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdomhisinfo(unsigned short FlibHndl, ODBOMIF *hisif);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hisif out

    Pointer to the ODBOMIF structure for the maximum number, current number and maximum string length of external operator's message history data. The ODBOMIF structure is as follows.

    typedef struct odbomif {
        unsigned short  om_max ;    /* maximum number         */
        unsigned short  om_sum ;    /* current number         */
        unsigned short  om_char ;   /* maximum string length  */
                                    /* of external operator's */
                                    /* message history data   */
    } ODBOMIF ;
    
    3113#7 3113#6 max.number max.length(including 'NULL')
    0 0 8 256
    0 1 10 201
    1 0 18 101
    1 1 32 51


    ERRORS

    Code Description
    EW_FUNC cnc_stopomhis function has not been executed.
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/ library function are necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_rdomhisno

    Reads the number of the external operator's message history data.

    It is necessary to execute "Stop logging operation history data" (cnc_stopophis) .


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdomhisno(unsigned short FlibHndl, unsigned short *hisno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hisno out

    Pointer to the variable in which the number of the external operator's message history data is stored.


    ERRORS

    Code Description
    EW_FUNC cnc_stopomhis function has not been executed.
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/ library function are necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_rdomhistry

    Reads the external operator's message history data.

    Because the external operator's message history data is recorded automatically by CNC, it is necessary to stop logging by using cnc_stopomhis function before this function is used.

    In order to minimize the time when the logging is being suspended, restart logging by using cnc_startomhis function as soon as possible after reading history data completes.

    The message history data is acquired in new order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdomhistry(unsigned short FlibHndl, unsigned short s_no, unsigned short *number, ODBOMHIS *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(0, 1, 2,...)

    number in/out

    Specify the pointer to the number of history data to be read. Set the number of history data to be read at a time, and this function returns the number of history data which was read actually.

    his out

    Pointer to the ODBOMIF structure for the external operator's message history data. The ODBOMIF structure is as follows.

    typedef struct odbomhis {
        short   om_no;          /* operator's message number */
        short   year;           /* year   */
        short   month;          /* month  */
        short   day;            /* day    */
        short   hour;           /* hour   */
        short   minute;         /* minute */
        short   second;         /* second */
        char    om_msg[256];    /* operator's message */
    } ODBOMHIS ;
    
    om_no
    operator's message number
    year
    year (0,...,99)
    month
    month (1,...,12)
    day
    day (1,...,31)
    hour
    hour (0,...,23)
    minute
    minute (0,...,59)
    second
    second (0,...,59)
    om_msg
    operator's message
    The last character is 'NULL(\0)'.

    ERRORS

    Code Description
    EW_FUNC cnc_stopomhis function has not been executed.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/ library function are necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_rdomhistry2

    Reads the external operator's message history data. Please use this function for Series 30i, 0i-D/F and PMi-A.

    The unit of one external operator's message history data is called a record.

    The operation history data and the alarm history data are automatically recorded on the CNC. When these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.
    And it is necessary to execute "Restart logging operation history data" (cnc_startophis) after reading to make the sampling stop time of the history data as short as possible.

    The start/end record number means the relative number uesd at reading the alarm history data. These record numbers are valid only at the period from the execution of "Stop logging operation history data" until the execution of "Restart logging operation history data".

    The message history data is acquired in old order.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdomhistry2(unsigned short FlibHndl, unsigned short s_no,unsigned short e_no, unsigned short length,ODBOMHIS2 *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number. (specify 1 or more.)

    e_no in

    Specify the end record number. (specify 1 or more.)

    length in

    Specify the data block length. (size of ODBOMHIS2 structure)


    his out

    Pointer to the ODBOMHIS2 structure in which the alarm history data is stored. The ODBOMHIS2 structure is as follows.

    typedef struct odbmhis2 {
        unsigned short  s_no;       /* Start record number       */
        unsigned short  e_no;       /* Most recently entered     */
                                    /* record number             */
        struct {
            short   dsp_flg;        /* Flag for displaying       */
            short   om_no;          /* operator's message number */
            short   year;           /* year                      */
            short   month;          /* month                     */
            short   day;            /* day                       */
            short   hour;           /* hour                      */
            short   minute;         /* minute                    */
            short   second;         /* second                    */
            char    ope_msg[256];   /* operator's message        */
        } opm_his[N];               /* N : number of external operator's 
                                           message history data to be read */
    } ODBOMHIS2;
    
    dsp_flg
    Flag for displaying
    1 display "EXxxxx"
    0 display as it is
    om_no
    operator's message number
    year
    year (1995,...,2094)
    month
    month (1,...,12)
    day
    day (1,...,31)
    hour
    hour (0,...,23)
    minute
    minute (0,...,59)
    second
    second (0,...,59)
    ope_msg
    operator's message
    The last character is 'NULL(\0)'.

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBOMHIS2 structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 4 > length
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/ library function are necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_rdophisno

    Reads the number of operation history data.

    It is necessary to stop sampling the operation history data by using cnc_stopophis function before this function is used.

    (Example)

    • Series 15, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • When the operation history screen of CNC displays the following data, this function reads that the number of operation history data equals 6.
      Number Data Kind
      1 99/11/22 Power-on time
      2 12:34:56
      3 PS0181 Alarm
      4 99/11/22
      5 13:00:00
      6 [SOFT 1] MDI key
    • Series 15i, 30i, 0i-D/F, PMi-A
    • When the operation history screen of CNC displays the following data, this function reads that the number of operation history data equals 3.
      Number Data Kind
      1 99/11/22 Power-on time
      12:34:56
      2 PS0181 Alarm
      99/11/22
      13:00:00
      3 [SOFT 1] MDI key


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdophisno(unsigned short FlibHndl, unsigned short *hisno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hisno out

    Pointer to the variable in which the number of operation history data is stored.


    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_NOOPT No option
    The extended driver/library function are necessary.

    history\cnc_rdophistry

    Reads the operation history data.
    Please use cnc_rdophistry2 function instead of this function for Series 15i.
    Also please use cnc_rdophistry4 function for Series 30i.

    It is necessary to execute cnc_stopophis function before this function is used.
    And it is necessary to execute cnc_startophis function after reading data as short as possible.

    The structure of the operation history data is different according to the kind of the record(rec_type). When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.

    The start/end record number means the relative number uesd at reading the operation history data. These record numbers are valid only at the period from the execution of cnc_stopophis function until the execution of cnc_startophis function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdophistry(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, unsigned short length, ODBHIS *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in

    Specify the end record number.(more than 1)

    length in

    Specify the data block length(size of ODBHIS structure).






    his out

    Pointer to the ODBHIS structure in which the operation history data is stored. The ODBHIS structure is as follows.

    typedef struct odbhis {
        unsigned   s_no;                /* Start record number      */
        short      type;                /* Not used                 */
        unsigned   e_no;                /* Most recently entered    */
                                        /* record number            */
        union {
            struct {
                short      rec_type;    /* Record type            */
                short      alm_grp;     /* Alarm type             */
                short      alm_no;      /* Alarm number           */
                char       axis_no;     /* Axis number            */
                char       dummy;       /* Not used               */
            } rec_alm;                  /* Structure of alarm     */
                                        /* record                 */
            struct {
                short      rec_type;    /* Record type            */
                char       key_code;    /* Key code               */
                char       pw_flag;     /* Power-on flag          */
                char       dummy[4];    /* Not used               */
            } rec_mdi;                  /* Structure of           */
                                        /* MDI key record         */
            struct {
                short      rec_type;    /* Record type            */
                char       sig_name;    /* Signal name            */
                char       sig_old;     /* Bit pattern before a   */
                                        /* transition             */
                char       sig_new;     /* Bit pattern after a    */
                                        /* transition             */
                char       dummy;       /* Not used               */
                short      sig_no;      /* Signal number          */
            } rec_sgn;                  /* Structure of signal    */
                                        /* record                 */
            struct {
                short      rec_type;    /* Record type            */
                char       year;        /* Year                   */
                char       month;       /* Month                  */
                char       day;         /* Day                    */
                char       pw_flag;     /* Power-on flag          */
                char       dummy[2];    /* Not used               */
            } rec_date;                 /* Structure of date      */
                                        /* record                 */
            struct {
                short      rec_type;    /* record type            */
                char       hour;        /* Hour                   */
                char       minute;      /* Minute                 */
                char       second;      /* Second                 */
                char       pw_flag;     /* Power-on flag          */
                char       dummy[2];    /* Not used               */
            } rec_time;                 /* Structure of Time      */
                                        /* record                 */
        } data[N];                      /* N : Number of record */
    } ODBHIS ;
    
    rec_type
    Record type
    0 : MDI key history
    1 : Signal history
    2 : Alarm history
    3 : Date history
    4 : Time history
    5 : MDI key history for SUB (only Series 16/18/21, Power Mate i)
    6 : Signal history for SUB (only Series 16/18/21, Power Mate i)
    7 : Alarm history for SUB (only Series 16/18/21, Power Mate i)
    10 : MDI key history for 3rd Path (only Series 16i)
    11 : Signal history for 3rd Path (only Series 16i)
    12 : Alarm history for 3rd Path (only Series 16i)
    alm_grp
    Alarm type
    • Series 15 (HSSB only)
    bit 0 : Background P/S (BG)
    bit 1 : Foreground P/S (PS)
    bit 2 : Over heat alarm (OH)
    bit 3 : Sub-CPU error (SB)
    bit 4 : Syncronized error (SN)
    bit 5 : Parameter switch on (SW)
    bit 6 : Over travel, external data (OT)
    bit 7 : PMC error (PC)
    bit 8 : External alarm message (EX)
    bit 9 : (Not used)
    bit 10 : Serious P/S (SR)
    bit 11 : (Not used)
    bit 12 : Servo alarm (SV)
    bit 13 : I/O error (IO)
    bit 14 : Power off parameter set (PW)
    bit 15 : (Not used)

    • Series 16/18/21, 16i/18i/21i, 0i, Power Mate i
    bit 0 : P/S 100
    bit 1 : P/S 000
    bit 2 : P/S 101
    bit 3 : P/S others
    bit 4 : Over travel
    bit 5 : Over heat
    bit 6 : Servo alarm
    bit 7 : System alarm
    bit 8 : APC alarm
    bit 9 : Spindle alarm
    bit 10 : P/S 5000,.., Punch press alarm
    bit 11 : Laser alarm
    bit 12 : (Not used)
    bit 13 : Rigid tap alarm
    bit 14 : (Not used)
    bit 15 : External alarm message

    • Series 16i/18i-W
    bit 0 : P/S alarm
    bit 1 : Overtravel alarm
    bit 2 : Servo alarm
    bit 3 : (Not used)
    bit 4 : Overheat alarm
    bit 5 : Stroke limit - 1
    bit 6 : Stroke limit - 2
    bit 7 : Edit alarm
    bit 8 : APC alarm
    bit 9 : System alarm
    bit 10 : P/S 5000 ... alarm
    bit 11 : (Not used)
    bit 12 : (Not used)
    bit 13 : (Not used)
    bit 14 : External alarm
    bit 15 : Reverse control alarm
    alm_no
    Alarm number
    Only P/S alarm, System alarm and External alarm are effective.(expect Series 15)
    axis_no
    Axis number(only Series 15)
    0 is stored for an unrelated alarm to the axis.
    key_code
    Key code
    pw_flag
    Power-on flag
      1 : For power on
      0 : Usually, 0 is stored
    sig_name
    Signal name
      1 : X
      2 : G
      3 : Y
      4 : F
    sig_old
    Bit pattern before transition
    sig_new
    Bit pattern after transition
    sig_no
    Signal number
      X : 0~127 or 1000~1063
      G : 0~255 or 1000~1255 or 2000~2255
      Y : 0~127 or 1000~1063
      F : 0~255 or 1000~1255 or 2000~2255
    In Series 16i/18i/21i MODEL B, when the extended operation history function exists:
      X : 0~127 or 200~327 or 1000~1063
      G : 0~511 or 1000~1511 or 2000~2511
      Y : 0~127 or 200~327 or 1000~1063
      F : 0~511 or 1000~1511 or 2000~2511
    year
    Year (0~99)
    month
    Month (1~12)
    day
    Date (1~31)
    hour
    Hour (0~23)
    minute
    Minute (0~59)
    second
    Second (0~59)

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of ODBHIS structure(length) is wrong.
    (e_no-s_no+1) * sizeof(data[0]) + 6 < length
    EW_NUMBER data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdophistry2

    Reads the operation history data.
    Please use this function instead of cnc_rdophistry function for Series 15i.

    It is necessary to execute cnc_stopophis function before this function is used.
    And it is necessary to execute cnc_startophis function after reading data as short as possible.

    The structure of the operation history data is different according to the kind of the record(rec_type). When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.

    The start/end record number means the relative number uesd at reading the operation history data.
    These record numbers are valid only at the period from the execution of "Stop logging operation history data"(cnc_stopophis function) until the execution of "Restart logging operation history data"(cnc_startophis function).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdophistry2(unsigned short FlibHndl, unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in/out

    Specify the pointer to the end record number.(more than 1)
    The last record number which was read actually is returned.

    length in/out

    Specify the data block length which is enough to store the specified operation history data.
    One operation history data is set in the ODBOPHIS structure and the size of the structure is represented by rec_len. This structure is lined up in order of number of operation history data. So, specify the sum of rec_len of these structures.
    Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size.





    his out

    Pointer to the area to store the operation history data. Each operation history data can be referred by using the ODBOPHIS structure.

    typedef struct odbophis {
        short   rec_len;            /* Length             */
        short   rec_type;           /* Record type        */
        union {
            struct {
                char    key_code;   /* Key code           */
                char    pw_flag;    /* Power-on flag      */
                short   dummy;
            } rec_mdi;
            struct {
                short   sig_name;   /* Signal name        */
                short   sig_no;     /* Signal number      */
                char    sig_old;    /* Bit pattern before */
                                    /* transition         */
                char    sig_new;    /* Bit pattern after  */
                                    /* transition         */
                short   dummy;
            } rec_sgn;
            struct {
                short   alm_grp;    /* Alarm type         */
                short   alm_no;     /* Alarm number       */
                short   axis_no;    /* Axis number        */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   dummy;
            } rec_alm;
            struct {
                short   evnt_type;  /* Event type         */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   dummy;
            } rec_:;
        } u;
    } ODBOPHIS;
    
    rec_len
    Length of the ODBOPHIS structure
    rec_type
    Record type
    0 : MDI key
    1 : Signal
    2 : Alarm
    3 : Date/Time
    key_code
    Key code
    pw_flag
    Power-on flag

    1 : For power on
    0 : Usually, 0 is stored
    sig_name
    Signal name

    1 : X
    2 : G
    3 : Y
    4 : F
    sig_no
    Signal number

    X : 0,..,127, 1000,..,1063
    G : 0,..,255, 1000,..,1255
    Y : 0,..,127, 1000,..,1063
    F : 0,..,255, 1000,..,1255
    sig_old
    Bit pattern before transition
    sig_new
    Bit pattern after transition
    alm_grp
    Alarm type
    • Series 15i
    0 : Background P/S (BG)
    1 : Foreground P/S (PS)
    2 : (Not used)
    3 : (Not used)
    4 : Syncronized error (SN)
    5 : Parameter switch on (SW)
    6 : Over travel, External data (OT)
    7 : PMC error (PC)
    8 : External alarm message (EX)
    9 : (Not used)
    10 : Serious P/S (SR)
    11 : (Not used)
    12 : Servo alarm (SV)
    13 : I/O error (IO)
    14 : Power off parameter set (PW)
    15 : System alarm (SY)
    16 : External alarm message (2) (EX)
    17 : External alarm message (3) (EX)
    18 : External alarm message (4) (EX)
    19 : Macro alarm (MC)
    20 : Spindle alarm (SP)
    alm_no
    Alarm number
    axis_no
    Axis number(from 1 to maximum controlled axis) or Spindle number(from 1 to maximum spindle number) 0 is stored for an unrelated alarm to the axis and the spindle.
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    evnt_type
    Event type
    0 : Power off
    1 : Power on
    2 : Change date
    3 : Time stamp
    4 : Erace history data

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of area to store the operation history data(length) is wrong.
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdophistry3

    Reads the operation history data.
    Please use this function instead of cnc_rdophistry function for Series 30i.

    It is necessary to execute cnc_stopophis function before this function is used.
    And it is necessary to execute cnc_startophis function after reading data as short as possible.

    The structure of the operation history data is different according to the kind of the record(rec_type). When the operation history data is accessed, it is necessary to use a structure corresponding to the kind.

    The start/end record number means the relative number uesd at reading the operation history data.
    These record numbers are valid only at the period from the execution of "Stop logging operation history data"(cnc_stopophis function) until the execution of "Restart logging operation history data"(cnc_startophis function).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdophistry3(unsigned short FlibHndl, unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in/out

    Specify the pointer to the end record number.(more than 1)
    The last record number which was read actually is returned.

    length in/out

    Specify the data block length which is enough to store the specified operation history data.
    One operation history data is set in the ODBOPHIS3 structure and the size of the structure is represented by rec_len. This structure is lined up in order of number of operation history data. So, specify the sum of rec_len of these structures.
    Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size.





    his out

    Pointer to the area to store the operation history data. Each operation history data can be referred by using the ODBOPHIS3 structure.

    typedef struct odbophis3 {
        short  rec_len;             /* Length             */
        short  rec_type;            /* Record type        */
        union {
            struct {
                char    key_code;   /* Key code           */
                char    pw_flag;    /* Power-on flag      */
                short   pth_no;     /* Path no.           */
            } rec_mdi;                /* MDI */
            struct {
                short   sig_name;   /* Signal name        */
                short   sig_no;     /* Signal number      */
                char    sig_old;    /* Bit pattern before transition */
                char    sig_new;    /* Bit pattern after  transition */
                short   pmc_no;     /* PMC number         */
            } rec_sgn;                /* Signal */
            struct {
                short   alm_grp;    /* Alarm type         */
                short   alm_no;     /* Alarm number       */
                short   axis_no;    /* Axis number        */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
            } rec_alm;                /* Alarm */
            struct {
                short   evnt_type;  /* Event type         */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   dummy;
            } rec_date;               /* Date/Time */
        } u;
    } ODBOPHIS3 ;
    
    rec_len
    Length of the ODBOPHIS structure
    rec_type
    Record type
    0 : MDI key
    1 : Signal
    2 : Alarm
    3 : Date/Time
    key_code
    Key code
    pw_flag
    Power-on flag

    1 : For power on
    0 : Usually, 0 is stored
    sig_name
    Signal name

    1 : X
    2 : G
    3 : Y
    4 : F
    sig_no
    Signal number

    X : 0,..,127
    G : 0,..,255
    Y : 0,..,127
    F : 0,..,255
    sig_old
    Bit pattern before transition
    sig_new
    Bit pattern after transition
    alm_grp
    Alarm type
    0 : Parameter switch on (SW)
    1 : Power off parameter set (PW)
    2 : I/O error (IO)
    3 : Foreground P/S (PS)
    4 : Overtravel,External data (OT)
    5 : Overheat alarm (OH)
    6 : Servo alarm (SV)
    7 : Data I/O error (SR)
    8 : Macro alarm (MC)
    9 : Spindle alarm (SP)
    10 : Other alarm(DS) (DS)
    11 : Alarm concerning Malfunction prevent functions (IE)
    12 : Background P/S (BG)
    13 : Syncronized error (SN)
    14 : (reserved)
    15 : External alarm message (EX)
    16 : (reserved)
    17 : (reserved)
    18 : (reserved)
    19 : PMC error (PC)
    20 to 31 : (Not used)
    alm_no
    Alarm number
    axis_no
    Axis number(from 1 to maximum controlled axis) or Spindle number(from 1 to maximum spindle number) 0 is stored for an unrelated alarm to the axis and the spindle.
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    evnt_type
    Event type
    0 : Power off
    1 : Power on
    2 : Change date
    3 : Time stamp
    4 : Erace history data
    pth_no
    Path number(0〜9)
    pmc_no
    PMC number(0〜2)


    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of area to store the operation history data(length) is wrong.
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_rdophistry4

    Reads the operation history data.
    Please use this function instead of cnc_rdophistry function for Series 30i, 0i-D/F and PMi-A.

    The structure of the operation history data is different according to the kind of the record.

    The operation history data and the alarm history data are automatically recorded on the CNC.
    Kind of these data are accessed, it is necessary to temporarily stop sampling on the CNC. Therefore, it is necessary to execute "Stop logging operation history data"(cnc_stopophis) before this function is used.

    The start/end record number means the relative number used at reading the operation history data.
    These record numbers are valid only at the period from the execution of "Stop logging operation history data"(cnc_stopophis function) until the execution of "Restart logging operation history data"(cnc_startophis function).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdophistry4(unsigned short FlibHndl,unsigned short s_no, unsigned short *e_no, unsigned short *length, void *his);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start record number.(more than 1)

    e_no in/out

    Specify the pointer to the end record number.(more than 1)
    The last record number which was read actually is returned.

    length in/out

    Specify the data block length which is enough to store the specified operation history data.
    One operation history data is set in the ODBOPHIS4 structure and the size of the structure is represented by rec_len. This structure is lined up in order of number of operation history data. So, specify the sum of rec_len of these structures.
    When the plural data is acquired, the second or later data is acquired just behind the previous data as follows. (It is not the order of the array of a structure.)
    When you read the second or later data, calculate the pointer which adds data length (rec_len) to the top pointer of data immediately before.


    Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size.















    his out

    Using the ODBOPHIS4 structure can refer each operation history data.

    typedef struct odbophis4 {
        short  rec_len;             /* Length             */
        short  rec_type;            /* Record type        */
        union {
            struct {
                char    key_code;   /* Key code           */
                char    pw_flag;    /* Power-on flag      */
                short   pth_no;     /* Path number        */
                short   ex_flag;    /* External MDI key flag*/
                short   hour;       /* Hour */
                short   minute;     /* Minute */
                short   second;     /* Second */
            } rec_mdi;              /* MDI */
            struct {
                short   sig_name;   /* Signal name        */
                short   sig_no;     /* Signal number      */
                char    sig_old;    /* Bit pattern before transition */
                char    sig_new;    /* Bit pattern after  transition */
                short   pmc_no;     /* PMC number         */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   dummy;
            } rec_sgn;              /* Signal             */
            struct {
                short   alm_grp;    /* Alarm type         */
                short   alm_no;     /* Relative axis number in the path or Relative spindle number in the path */
                short   axis_no;    /* Axis number        */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
            } rec_alm;              /* Alarm              */
            struct {
                short   evnt_type;  /* Event type         */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   dummy;
            } rec_date;             /* Date/Time          */
            struct {
                short   alm_grp;    /* Alarm type         */
                short   alm_no;     /* Alarm number       */
                short   axis_no;    /* Absolute axis number or Absolute spindle number */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
                short   sys_alm;    /* unused */
                short   dsp_flg;    /* Flag for displaying */
                short   axis_num;   /* Total axis number  */
                long    g_modal[10];/* Modal data of G code */
                char    g_dp[10];   /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
                long    a_modal[10];/* Modal data of B,D,E,F,H,M,N,O,S,T code */
                char    a_dp[10];   /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
                long    abs_pos[32];/* Absolute position in alarm occurring */
                char    abs_dp[32]; /* Absolute position place of decimal point in alarm occurring */
                long    mcn_pos[32];/* Machine position in alarm occurring */
                char    mcn_dp[32]; /* Machine position place of decimal point in alarm occurring */
            } rec_ial;                /* Additional information alarm */
            struct {
                short   alm_grp;    /* Alarm type         */
                short   alm_no;     /* Alarm number       */
                short   axis_no;    /* Absolute axis number or Absolute spindle number */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
                short   sys_alm;    /* unused */
                short   dsp_flg;    /* Flag for displaying */
                short   axis_num;   /* Total axis number */
                char    alm_msg[64];/* Alarm message */
                long    g_modal[10];/* Modal data of G code */
                char    g_dp[10];   /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
                long    a_modal[10];/* Modal data of B,D,E,F,H,M,N,O,S,T code */
                char    a_dp[10];   /* #7=1 There is a command in the present block. */
                                    /* #6〜#0 place of decimal point */
                long    abs_pos[32];/* Absolute position in alarm occurring */
                char    abs_dp[32]; /* Absolute position place of decimal point in alarm occurring */
                long    mcn_pos[32];/* Machine position in alarm occurring */
                char    mcn_dp[32]; /* Machine position place of decimal point in alarm occurring */
            } rec_mal;                /* Additional information and message alarm */
            struct {
                short   dsp_flg;    /* Flag for displaying */
                short   om_no;      /* Message number     */
                short   year;       /* Year               */
                short   month;      /* Month              */
                short   day;        /* Day                */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                char    ope_msg[256];/* Message */
            } rec_opm;              /* External operator's message */
            struct {
                short   ofs_grp;    /* Tool offset data type */
                short   ofs_no;     /* Tool offset number */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number */
                long    ofs_old;    /* Tool offset data before transition */
                long    ofs_new;    /* Tool offset data after transition */
                short   old_dp;     /* Tool offset data place of decimal point before transition */
                short   new_dp;     /* Tool offset data place of decimal point after transition */
            } rec_ofs;              /* Tool offset transition */
            struct {
                short   prm_grp;    /* Parameter data type */
                short   prm_num;    /* Parameter number */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   prm_len;    /* Parameter data length */
                long    prm_no;     /* Parameter number   */
                long    prm_old;    /* Parameter data before transition */
                long    prm_new;    /* Parameter data after transition */
                short   old_dp;     /* Parameter data place of decimal point before transition */
                short   new_dp;     /* Parameter data place of decimal point after transition */
            } rec_prm;              /* Parametertransition */
            struct {
                short   ofs_grp;    /* Work offset data type */
                short   ofs_no;     /* Work offset number */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
                short   axis_no;    /* Axis number */
                short   dummy;
                long    ofs_old;    /* Work offset data before transition */
                long    ofs_new;    /* Work offset data after transition */
                short   old_dp;     /* Work offset data place of decimal point before transition */
                short   new_dp;     /* Work offset data place of decimal point after transition */
            } rec_wof;              /* Work offset transition */
            struct {
                short   mac_no;     /* Custom macro common variable number */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
                long    mac_old;    /* Common variable data before transition */
                long    mac_new;    /* Common variable data after transition */
                short   old_dp;     /* Common variable data place of decimal point before transition */
                short   new_dp;     /* Common variable data place of decimal point after transition */
            } rec_mac;              /* Custom macro common variable transition */
            struct {
                long    mac_no;     /* Custom macro common variable number(Extension) */
                short   hour;       /* Hour               */
                short   minute;     /* Minute             */
                short   second;     /* Second             */
                short   pth_no;     /* Path number        */
                long    mac_old;    /* Common variable data before transition */
                long    mac_new;    /* Common variable data after transition */
                short   old_dp;     /* Common variable data place of decimal point before transition */
                short   new_dp;     /* Common variable data place of decimal point after transition */
            } rec_mac2;             /* Custom macro common variable transition */
            struct {
                short   scrn_old;   /* Old screen number */
                short   scrn_new;   /* New screen number */
                short   dummy;
                short   hour;       /* Hour */
                short   minute;     /* Minute */
                short   second;     /* Second */
            } rec_scrn;             /* Change of screen(number) */
        } u;
    } ODBOPHIS4 ;
    
    rec_len
    Length of the ODBOPHIS4 structure
    rec_type
    Record type
    0 : MDI key
    1 : Signal
    2 : Alarm
    3 : Date/Time
    4 : Custom macro common variable transition
    5 : Parameter transition
    6 : External operator's message
    7 : Tool offset transition
    8 : Work offset transition
    9 : Additional information alarm
    10 : Additional information and message alarm
    11 : Custom macro common variable(Extension) transition
    12 : Change of Screen(number)
    -1 : History data of unsupport
    key_code
    Key code
      0 1 2 3 4 5 6 7
    0     SP 0 @ P `  
    1     ! 1 A Q    
    2     " 2 B R    
    3     # 3 C S    
    4     $ 4 D T    
    5     % 5 E U    
    6     & 6 F V    
    7     ' 7 G W    
    8     ( 8 H X    
    9 TAB   ) 9 I Y    
    A EOB   * : J Z    
    B     + ; K [   {
    C     , < L \   |
    D     - = M ]   }
    E     . > N     ~
    F     / ? O _    

      8 9 A B C D E F
    0   RESET [SKV9]         [F1]
    1     [SKV8]         [F2]
    2     [SKV7]         [F3]
    3     [SKV6]         [F4]
    4 SHIFT INSERT [SKV5]       AUX [F5]
    5   DELETE [SKV4]         [F6]
    6 CAN ALTER [SKV3]         [F7]
    7   ALT [SKV2]         [F8]
    8 INPUT [SKV1]       POS [F9]
    9 CALC         PROG [F10]
    A HELP         OFFSET
    SETTING
     
    B CTRL         SYSTEM  
    C   ABC/abc         MESSAGE  
    D             GRAPH  
    E Page↓           CUSTOM [FR]
    F Page↑           CUSTOM2 [FL]
    pw_flag
    Power-on flag
    1 : For power on
    0 : Usually, 0 is stored
    ex_flag
    External MDI key flag
    1 : External MDI key
    0 : Usual MDI key
    sig_name
    Signal name
    1 : X
    2 : G
    3 : Y
    4 : F
    sig_no
    Signal number
    X : 0,..,127
    G : 0,..,767
    Y : 0,..,127
    F : 0,..,767
    sig_old
    Bit pattern before transition
    sig_new
    Bit pattern after transition
    alm_grp
    Alarm type
    0 : Parameter switch on (SW)
    1 : Power off parameter set (PW)
    2 : I/O error (IO)
    3 : Foreground P/S (PS)
    4 : Overtravel,External data (OT)
    5 : Overheat alarm (OH)
    6 : Servo alarm (SV)
    7 : Data I/O error (SR)
    8 : Macro alarm (MC)
    9 : Spindle alarm (SP)
    10 : Other alarm(DS) (DS)
    11 : Alarm concerning Malfunction prevent functions (IE)
    12 : Background P/S (BG)
    13 : Synchronized error (SN)
    14 : (reserved)
    15 : External alarm message (EX)
    19 : PMC error (PC)
    20 to 31 : (Not used)
    alm_no
    Alarm number
    axis_no
  • rec_type 2(Alarm), rec_type 9(Additional information alarm) and rec_type 10(Additional information and message alarm)
    • The relative axis number(1,..,max controlled axes) in the path or the relative spindle number(1,..,max spindle number) in the path is set in this variable.
      When the flexible path axis assignment function is valid, the absolute axis number + 1000(1001,..,max controlled axis number + 1000) or the relative spindle number(1,..,max spindle number) in the path is set in this variable.
      (Absolute axis number or absolute spindle number 0 is stored for an unrelated alarm to the axis and the spindle.)
  • rec_type 8(Work offset transition)
    • The relative axis number(0,..,max controlled axes - 1) in the path is set in this variable.
      When the flexible path axis assignment function is valid, the absolute axis number + 1000(1001,..,max controlled axis number + 1000) is set in this variable.
    year
    Year (1995,..,2094)
    month
    Month (1,..,12)
    day
    Day (1,..,31)
    hour
    Hour (0,..,23)
    minute
    Minute (0,..,59)
    second
    Second (0,..,59)
    evnt_type
    Event type
    0 : Power off
    1 : Power on
    2 : Change date
    3 : Time stamp
    4 : Erase history data
    pth_no
    Path number(1,..,10)
    pmc_no
    PMC number(1,..,3)
    axis_num
    Total axis number(1,..,32)
    g_modal
    Modal G code of specified G code group at alarm occurring (nonexistence -1)
    Modal G code group number is specified by the parameter from No.12990 to No.12999.
    g_dp
    Place of decimal point of Modal G code (nonexistence -1)
    #7=1 There is a command in the present block.
    #6〜#0 place of decimal point

    #7=0 There is not a command in the present block.
        =1 There is a command in the present block.
         g_modal[0] ,g_dp[0]=parameter12990
             :     :
         g_modal[9] ,g_dp[9]=parameter12990
    a_modal
    Modal data of 2nd auxiliary function(prm3460),D,E,F,H,M,N,O,S,T code in alarm occurring(nonexistence -1)
         a_modal[0] ,a_dp[0]=2nd auxiliary function code ,a_modal[1] ,a_dp[1]=D code
         a_modal[2] ,a_dp[2]=E code ,a_modal[3] ,a_dp[3]=F code
         a_modal[4] ,a_dp[2]=H code ,a_modal[5] ,a_dp[3]=M code
         a_modal[6] ,a_dp[2]=Sequence number ,a_modal[7] ,a_dp[3]=Promgam number or Program Name Note)
         a_modal[8] ,a_dp[2]=S code ,a_modal[9] ,a_dp[3]=T code
         Note) In case of program name, specify 5 charactors of head.

    a_dp
    #7=1 There is a command in the present block.(nonexistence -1)
    #6〜#0 place of decimal point

    #7=0 There is not a command in the present block.
        =1 There is a command in the present block.
    abs_pos
    Absolute position in alarm occurring
    abs_dp
    Absolute position place of decimal point in alarm occurring
    mcn_pos
    Machine position in alarm occurring
    mcn_dp
    Machine position place of decimal point in alarm occurring
    *More than axis number is unused.
    alm_msg
    Alarm message
    dsp_flg
    Flag for message displaying
    In case of the Macro alarm(alm_grp=8), the state of 6008#1 can be acquired.
    In case of the External alarm message(alm_grp=15), the state of 6301#0 can be acquired.
    In case of the External operator's message, the state of 6301#1 can be acquired.
    * The status of a point at alarm occurring can get.
    om_no
    Message number
    ope_msg
    Message( null(\0) end)
    ofs_grp
    Tool offset data type
  • rec_type:7 In case of tool offset transition.(Kind of tool offset is set.)
  • 0 : Tool offset               (M series Memory A)
    1 : Geometry offset   2 : Wear offset       (M series Memory B)
    3 : Tool length offset(geometry)   4 : Tool length offset(wear)       (M series Memory C)
    5 : Tool cutter radius offset(geometry)   6 : Tool cutter radius offset(wear)       (M series Memory C)
    7 : X-axis tool offset   8 : Z-axis tool offset       (T series Memory A)
    9 : X-axis tool offset(geometry)   10 : X-axis tool offset(wear)       (T series Memory B)
    11 : Z-axis tool offset(geometry)   12 : Z-axis tool offset(wear)       (M/T series Memory B)
    13 : Tool nose radius offset               (M/T series Memory A)
    14 : Tool nose radius offset(geometry)   15 : Tool nose radius offset(wear)       (M/T series Memory A)
    16 : Y-axis tool offset               (T series Memory A)
    17 : Y-axis tool offset(geometry)   18 : Y-axis tool offset(wear)       (T series Memory B)
    19 : Direction of tool nose               (Common :M/T series(M series PRM5009#5=1))
    20 : X-axis second geometry offset   21 : Z-axis second geometry offset       (T series )
    22 : Y-axis second geometry offset
  • rec_type:8 In case of work offset transition(Kind of work offset data is set.)
  • 0 : Work offset(EXT,G54〜G59)
    1 : Work offset extension(G54.1P1〜G54.1P300)
    2 : Volume of work shift(Only T series)
    ofs_no
    Offset number
  • rec_type:7 In case of tool offset transition, tool offset number(1,..,9999)
  • rec_type:8 In case of work offset transition, work offset is as follows.
  • ofs_grp = 0 : 0=EXT,1=G54,2=G55,3=G56,4=G57,5=G58,6=G59
      = 1 : 1,..,300
      = 2 : Invalid
    ofs_old
    Tool/Work offset data before transition.
    ofs_new
    Tool/Work offset data after transition.
    old_dp
    Place of decimal point before transition(*1)
    new_dp
    Place of decimal point after transition(*1)
    (*1) Data type is tool/work offset, parameter and custom macro common variable. When the variable value is custom macro common variable, refer to the "Note) In case of custom macro common variable".
    mac_old
    Custom macro common variable data before transition
    mac_new
    Custom macro common variable data after transition
    note) In case of custom macro common variable, shows data format=M*10**(-E)).
    mac_old,mac_new : value of variable(=M)
    old_dp,new_dp : number of places of decimals(=E) (-128(0x80)〜127(0x7f))
    <example>
  • When the variable value is 12.345, each variables are read as follows.
  • tdmcr_val = 1234500000
    dec_val = 8
    → 1234500000*(10**(-8)) = 12.345
  • When the variable value is 123456789012345, each variables are read as follows.
  • mcr_val = 1234567890
    dec_val = -5
    → 1234567890*(10**5) = 123456789000000
    * Particularity
  • In case of "vacant":
  • mac_old,mac_new = 0、old_dp,new_dp = -1(0xff)
  • In case of overflow:
  • mac_old,mac_new = -1、old_dp,new_dp = -1(0xff)
    prm_grp
    Paramter data type(Kind of parameter data is set.)
    1:Axis type, 2:Spildle type, 3:Path type, 4:Machine group type, 0:Other
    prm_num
    Parameter data type(prm_grp) is valid range from 1 to 4.
    prm_grp=1 : Absolute number(1,..,MAX32)
    prm_grp=2 : Absolute spindle number(1,..,MAX8)
    prm_grp=3 : Path number(1,..,10)
    prm_grp=4 : Machine group number(1,..,3)
    prm_len
    Parameter data length
    0: BIT, 1:INT8, 2:INT16, 3:INT32, 4:REAL64
    prm_no
    Parameter number(0,..,99999)
    prm_old
    Paramter data befor transition
    prm_new
    Paramter data after transition

    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_LENGTH Data block length error
    Size of area to store the operation history data(length) is wrong.
    EW_NUMBER Data number error
    The specification of the record number (s_no, e_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    history\cnc_startomhis

    Restarts logging the external operator's message history data.

    The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_startophis.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_startomhis(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/library function are necessary.
    EW_FUNC cnc_stopomhis function has not been executed.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_startophis

    Restarts sampling the operation history data and the alarm history data of CNC.

    In Series 30i, 0i-D/F and PMi-A, the sampling of the external operator's message history data is restarted, too.
    (Please use cnc_startomhis function instead of this for other series.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_startophis(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_stopophis function has not been executed.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    Please confirm the CNC parameter.(In Series 16/18/21, 16i/18i/21i, 0i-A/B/C, No.3112#5 to '0'. In Series 16i/18i-W, No.3112#5 to '1'.)

    history\cnc_stopomhis

    Stops logging the external operator's message history data.

    The specification for Series 30i, 0i-D/F and PMi-A are same as cnc_stopophis.

    The sequence of reading the external operator's message history data is as follows.

    1. Stop logging.(cnc_stopomhis)(must be done)
    2. Read history data information.(cnc_rdomhisinfo, cnc_rdomhisno(30i, 0i-D/F, PMi-A only))
    3. Read history data.(cnc_rdomhistry)
    4. Restart logging.(cnc_startomhis)(must be done)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_stopomhis(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    cnc_stopomhis function has been executed.
    EW_NOOPT No option
    The external message option or the external data input option, and the extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    CNC parameter '3112#2' must be 1.

    history\cnc_stopophis

    Stops sampling the operation history data and the alarm history data of CNC.
    In Series 30i/31i/32i, 0i-D/F and PMi-A, the sampling stop of the external operator's message history is also directed.

    The operation history data and the alarm history data are automatically recorded on the CNC.
    When these data are accessed, it is necessary to temporarily stop sampling on the CNC by this function.
    And it is necessary to execute cnc_startophis function after reading to make the sampling stop time of the history data as short as possible.

    The sequence of reading the history data is as follows.

    1. Stop sampling. This must be done. (by this function)
    2. Read history data count.(by cnc_rdophisno, cnc_rdalmhisno functions)
    3. Read history data.(by cnc_rdophistry, cnc_rdophistry2, cnc_rdophistry4, cnc_rdalmhistry, cnc_rdalmhistry2, cnc_rdalmhistry3, cnc_rdalmhistry5 functions)
    4. Restart sampling. This must be done. (by cnc_startophis function)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_stopophis(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    cnc_stopophis function has been executed.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    Please confirm the CNC parameter.(In Series 16/18/21, 16i/18i/21i, 0i-A/B/C, No.3112#5 to '0'. In Series 16i/18i-W, No.3112#5 to '1'.)
    EW_REJECT CNC execution rejection(30i/31i/32i, 0i-D/F, PMi-A only)

    history\cnc_wrhissgnl

    Writes the target signal for the operation history.
    Please use cnc_wrhissgnl2 instead of this function for Series 16i/18i/21i MODEL B with the extended operation history function.
    And please use cnc_wrhissgnl3 function for Series 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhissgnl(unsigned short FlibHndl, IODBSIG *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig in

    Pointer to the IODBSIG structure to set the various target signal information for the operation history. The IODBSIG structure is as follows.

    typedef struct iodbsig {
        short      datano;   /* Not used          */
        short      type;     /* Number of signals */
        struct {
            short   ent_no;   /* Registration sequence number   */
            short   sig_no;   /* Registered signal number       */
            char    sig_name; /* Registered signal name         */
            char    mask_pat; /* Signal mask pattern            */
        } data[20];
    } IODBSIG ;
    
    type
    Number of signals (from 1 to 20)
    ent_no
    Registration sequence number (from 1 to 20)
    sig_no
    Signal number to register
    • Series 15/15i
    • X : 0~127
      G : 0~511
      Y : 0~127
      F : 0~511
    • Series 16i/18i/21i, 0i, Power Mate i
    • X : 0~127 or 1000~1063
      G : 0~255 or 1000~1255 or 2000~2255
      Y : 0~127 or 1000~1063
      F : 0~255 or 1000~1255 or 2000~2255
    sig_name
    Signal address to register
    0 : No registration
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of "Number of signals"(type) is wrong.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : "Registration sequence number"(ent_no) error
    2 : "Signal number"(sig_no) error
    3 : "Signal address"(sig_name) error
    And the wrong array number will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    • 0013#5=1 (Series 15/15i),
    • 3112#5=0 (Series 16/18/21, 16i/18i/21i, 0i, Power Mate i),
    • 3112#5=1 (Series 16i/18i-W)

    history\cnc_wrhissgnl2

    Writes the target signal for the operation history.
    Please use this function instead of cnc_wrhissgnl for Series 16i/18i/21i MODEL B with the extended operation history function.

    You can find out the extended operation history function exists on the CNC or not, by checking the value of "type" after calling cnc_rdhissgnl2 function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhissgnl2(unsigned short FlibHndl, IODBSIG2 *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig in

    Pointer to the IODBSIG2 structure to set the various target signal information for the operation history. The IODBSIG2 structure is as follows.

    typedef struct iodbsig2 {
        short      datano;   /* Not used          */
        short      type;     /* Number of signals */
        struct {
            short   ent_no;   /* Registration sequence number   */
            short   sig_no;   /* Registered signal number       */
            char    sig_name; /* Registered signal name         */
            char    mask_pat; /* Signal mask pattern            */
        } data[45];
    } IODBSIG2 ;
    
    type
    Number of signals for registration
    • Series 16i/18i/21i MODEL B, when the extended operation history function exists
    • 1~45
    • Other cases
    • 1~20
    ent_no
    Registration sequence number (from 1 to value of the type)
    sig_no
    Signal number to register
    • Series 16i/18i/21i MODEL B, when the extended operation history function exists
    • X : 0~127 or 200~327 or 1000~1063
      G : 0~511 or 1000~1511 or 2000~2511
      Y : 0~127 or 200~327 or 1000~1063
      F : 0~511 or 1000~1511 or 2000~2511
    • Other cases
    • X : 0~127 or 1000~1063
      G : 0~255 or 1000~1255 or 2000~2255
      Y : 0~127 or 1000~1063
      F : 0~255 or 1000~1255 or 2000~2255
    sig_name
    Signal address to register
    0 : No registration
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of "Number of signals"(type) is wrong.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : "Registration sequence number"(ent_no) error
    2 : "Signal number"(sig_no) error
    3 : "Signal address"(sig_name) error
    And the wrong array number will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    • 3112#5=0 (Series 16/18/21, 16i/18i/21i)

    history\cnc_wrhissgnl3

    Writes the target signal for the operation history.
    Please use this function instead of cnc_wrhissgnl for Series 30i, 0i-D/F and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhissgnl3(unsigned short FlibHndl, IODBSIG3 *sig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sig in

    Pointer to the IODBSIG3 structure to set the various target signal information for the operation history. The IODBSIG3 structure is as follows.

    typedef struct iodbsig3 {
        short      datano;   /* Not used          */
        short      type;     /* Number of signals */
        struct {
            short   ent_no;   /* Registration sequence number */
            short   pmc_no;   /* PMC number                   */
            short   sig_no;   /* Registered signal number     */
            char    sig_name; /* Registered signal name       */
            char    mask_pat; /* Signal mask pattern          */
        } data[60];
    } IODBSIG3 ;
    
    type
    Number of signals (from 1 to 60)
    pmc_no
    PMC number (1,2,3)
    ent_no
    Registration sequence number (from 1 to 60)
    sig_no
    Signal number to register
    X : 0~127
    G : 0~767
    Y : 0~127
    F : 0~767
    sig_name
    Signal address to register
    0 : No registration
    1 : X
    2 : G
    3 : Y
    4 : F
    mask_pat
    Signal mask pattern

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of "Number of signals"(type) is wrong.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : "Registration sequence number"(ent_no) error
    2 : "Signal number"(sig_no) error
    3 : "Signal address"(sig_name) error
    4 : "PMC number"(pmc_no) error
    And the wrong array number will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
  • 3195#6=0
  • history\cnc_wrkeyhistry

    The specified key code is recorded in the operation history in CNC.

    Even if this function is executed after the path is switched to path 2 by cnc_setpath, the history of key is recorded in the operation history in path 1. (Even if this function is executed from either path 1 or path 2, the history is recorded in the operation history in path 1.)

    If you want to use the loader(5th path), the system which corresponds to loader is necessary. When this function is executed for the system which does not correspond to loader(5th path), the operation is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrkeyhistry(unsigned short FlibHndl, char key_code);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    key_code in

    Specify the key code which wants to record in the operation history. The key code table which is able to record to the operation history is shown as follows.
    If you specify the blank key code in the table, EW_DATA error occurs.
    The following 32 key codes are not defined on FANUC's standard keyboard. So, those keys can be freely allocated by the application.

    - 0x10-0x1F (user01-user16)
    - 0xD0-0xDF (user17-user32)

  • Series 16i/18i/21i
  •   0 1 2 3 4 5 6 7
    0   user01 SP 0 @ P `  
    1   user02 ! 1 A Q    
    2   user03 " 2 B R    
    3   user04 # 3 C S    
    4   user05 $ 4 D T    
    5   user06 % 5 E U    
    6   user07 & 6 F V    
    7   user08 ' 7 G W    
    8   user09 ( 8 H X    
    9   user10 ) 9 I Y    
    A EOB user11 * : J Z    
    B   user12 +   K [   {
    C   user13 , < L \   |
    D   user14 - = M ]   }
    E   user15 . > N     ~
    F   user16 / ? O _    

      8 9 A B C D E F
    0   RESET       user17   [SF0]
    1           user18   [SF1]
    2           user19   [SF2]
    3           user20   [SF3]
    4 SHIFT INSERT       user21   [SF4]
    5   DELETE       user22   [SF5]
    6 CAN ALTER       user23   [SF6]
    7           user24   [SF7]
    8 INPUT       user25 POS [SF8]
    9         user26 PROG [SF9]
    A HELP       user27 OFFSET
    SETTING
     
    B CALC       user28 SYSTEM  
    C           user29 MESSAGE  
    D           user30 GRAPH  
    E Page↓         user31 CUSTOM [SFR]
    F Page↑         user32 FAPT [SFL]

  • Series 30i/31i/32i, 0i-D/F, PMi-A
  •   0 1 2 3 4 5 6 7
    0   user01 SP 0 @ P `  
    1   user02 ! 1 A Q    
    2   user03 " 2 B R    
    3   user04 # 3 C S    
    4   user05 $ 4 D T    
    5   user06 % 5 E U    
    6   user07 & 6 F V    
    7   user08 ' 7 G W    
    8   user09 ( 8 H X    
    9 TAB user10 ) 9 I Y    
    A EOB user11 * : J Z    
    B   user12 + ; K [   {
    C   user13 , < L \   |
    D   user14 - = M ]   }
    E   user15 . > N     ~
    F   user16 / ? O _    

      8 9 A B C D E F
    0   RESET [SVF9]     user17   [SHF1]
    1     [SVF8]     user18   [SHF2]
    2     [SVF7]     user19   [SHF3]
    3     [SVF6]     user20   [SHF4]
    4 SHIFT INSERT [SVF5]     user21 AUX [SHF5]
    5   DELETE [SVF4]     user22   [SHF6]
    6 CAN ALTER [SVF3]     user23   [SHF7]
    7   ALT [SVF2]     user24   [SHF8]
    8 INPUT [SVF1]     user25 POS [SHF9]
    9 CALC       user26 PROG [SHF10]
    A HELP       user27 OFFSET
    SETTING
     
    B CTRL       user28 SYSTEM  
    C   ABC/abc       user29 MESSAGE  
    D           user30 GRAPH  
    E Page↓         user31 CUSTOM [FR]
    F Page↑         user32 CUSTOM2 [FL]


    Note:
    Some key codes are not defined on FANUC's standard keyboard, so those keys are displayed in the Operation History Screen on CNC as follows. (Preceding "P_" means that the key is recorded by this function. In Series 30i/31i/32i, 0i-D/F and PMi-A, P_ does not display.)

    Key code Displaying form in the Operation History Screen(16i/18i/21i) Displaying form in the Operation History Screen(30i/31i/32i,0i-D/F,PMi-A)
    0x10-0x1F P_ 0x10-0x1F
    0x5E( ^ )   0x5E
    0x60( ` ) P_ 0x60
    0x7B( { ) P_; 0x7B
    0x7C( | ) P_< 0x7C
    0x7D( } ) P_= 0x7D
    0x7E( ~ ) P_> ~
    0x9B P_<POS> <CTRL>
    0xD0 P_<mark> 0xD0
    0xD1 P_<FAPT> 0xD1
    0xD2 P_<SF0> 0xD2
    0xD3 P_<SF1> 0xD3
    0xD4 P_<SF2> 0xD4
    0xD5 P_<SF3> 0xD5
    0xD6 P_<SF4> 0xD6
    0xD7 P_<SF5> 0xD7
    0xD8 P_<SF6> 0xD8
    0xD9 P_<SF7> 0xD9
    0xDA P_<SF8> 0xDA
    0xDB P_<SF9> 0xDB
    0xDC-0xDF P_ 0xDC-0xDF


    Note:
    Some key codes are not defined on FANUC's standard keyboard, so those keys are displayed in the Operation History Screen on CNC as follows.

    Key code Displaying form in the Operation History Screen(30i/31i/32i,0i-D/F,PMi-A)
    0x10-0x1F 0x10-0x1F
    0x5E( ^ ) 0x5E
    0x60( ` ) 0x60
    0x7B( { ) 0x7B
    0x7C( | ) 0x7C
    0x7D( } ) 0x7D
    0x7E( ~ ) ~
    0x9B <CTRL>
    0xD0 0xD0
    0xD1 0xD1
    0xD2 0xD2
    0xD3 0xD3
    0xD4 0xD4
    0xD5 0xD5
    0xD6 0xD6
    0xD7 0xD7
    0xD8 0xD8
    0xD9 0xD9
    0xDA 0xDA
    0xDB 0xDB
    0xDC-0xDF 0xDC-0xDF

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_DATA Data error
    The key_code is wrong.
    EW_NOOPT no option
    EW_PARAM CNC parameter error
  • The operation history function is invalid.
  • The operation history is not sampled.
  • EW_BUFFER Buffer full
    The buffer for the history record is full. Wait until the processing for the record ends or retry.

    laser\cnc_rddischarge

    Reads data related to electrical discharge at power compensation ends.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddischarge(unsigned short FlibHndl, ODBDISCHRG *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data out

    Specify the pointer to the array of ODBDISCHRG structure to store the data which related to electrical discharge at the end of power compensation.
    The ODBDISCHRG structure is as follows.

    typedef struct odbdischrg {
        unsigned short   aps;    /* Power supply select flag */
        unsigned short   year;   /* Year at power compensation ends */
        unsigned short   month;  /* Month at power compensation ends */
        unsigned short   day;    /* Day at power compensation ends */
        unsigned short   hour;   /* Hour at power compensation ends */
        unsigned short   minute; /* Minute at power compensation ends */
        unsigned short   second; /* Second at power compensation ends */
        short            hpc;    /* Peak power */
        short            hfq;    /* Pulse frequency */
        short            hdt;    /* Pulse duty */
        short            hpa;    /* Actual power */
        long             hce;    /* Power compensation coefficient */
        long             rfi[8]; /* RF current(RFI) */
        long             rfv[8]; /* RF voltage(RFV) */
        long             dci[8]; /* DC current(DCI) */
        long             dcv[8]; /* DC voltage(DCV) */
        long             dcw[8]; /* DC power(DCW) */
    } ODBDISCHRG;
    
    aps
    Power supply select flag
    #0 : PSU1 (Power supply 1)
    #1 : PSU2 (Power supply 2)
    : :
    #7 : PSU8 (Power supply 8)
    year
    Year at power compensation ends(4 digits at Christian era)
    month
    Month at power compensation ends(1-12)
    day
    Day at power compensation ends(1-31)
    hour
    Hour at power compensation ends(0-23)
    minute
    Minute at power compensation ends(0-59)
    second
    Second at power compensation ends(0-59)
    hpc
    Peak power (0-7000)
    hfq
    Pulse frequency (0-2000)
    hdt
    Pulse duty (0-100)
    hpa
    Actual power (0-7000)
    hce
    Power compensation coefficient (0-65535)
    rfi[8]
    RF current(RFI) (0-65535) 8 data at each power supply.
    rfv[8]
    RF voltage(RFV) (0-65535) 8 data at each power supply.
    dci[8]
    DC current(DCI) (0-65535) 8 data at each power supply.
    dcv[8]
    DC voltage(DCV) (0-65535) 8 data at each power supply.
    dcw[8]
    DC power(DCW) (0-65535) 8 data at each power supply.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L、30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rddischrgalm

    Reads alarm history data related to electrical discharge.

    When you acquire data before and after updating the history data, there might not be continuousness in the acquired data. So, usually acquire all data from the top.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddischrgalm(unsigned short FlibHndl, long s_no, long *number, ODBDISCHRGALM *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the reading start number of alarm history data related to electrical discharge. (0,1,2,...)

    number in/out

    Specify the pointer to the variable where the number of alarm history data related to electrical discharge which wants to be acquired was setted.
    This function returns the number of data which was read actually.
    The maximum number of history data is 5.

    data out

    Specify the pointer to the array of ODBDISCHRGALM structure to store the alarm history data related to electrical discharge. The number of array must be equal to "number".
    The ODBDISCHRGALM structure is as follows.

    typedef struct odbdischrgalm {
        unsigned short   year;       /* Year at alarm occurring */
        unsigned short   month;      /* Month at alarm occurring */
        unsigned short   day;        /* Day at alarm occurring */
        unsigned short   hour;       /* Hour at alarm occurring */
        unsigned short   minute;     /* Minute at alarm occurring */
        unsigned short   second;     /* Second at alarm occurring */
        long             almnum;     /* Alarm number */
        unsigned long    psec;       /* Progress time(second) */
        short            hpc;        /* Peak power */
        short            hfq;        /* Pulse frequency */
        short            hdt;        /* Pulse duty */
        short            hpa;        /* Actual power */
        long             hce;        /* Power compensation coefficient */
        unsigned short   asq;        /* Sequence number at alarm occurring */
        unsigned short   psu;        /* Power supply flag at alarm occurring */
        unsigned short   aps;        /* Power supply select flag */
        short            dummy;      /*  uunused */
        long             rfi[8];     /* RF current(RFI) */
        long             rfv[8];     /* RF voltage(RFV) */
        long             dci[8];     /* DC current(DCI) */
        long             dcv[8];     /* DC voltage(DCV) */
        long             dcw[8];     /* DC power(DCW) */
        short            almcd[8];   /* Power supply alarm code */
    } ODBDISCHRGALM;
    
    year
    Year at alarm occurring (4 digits at Christian era)
    month
    Month at alarm occurring (1-12)
    day
    Day at alarm occurring (1-31)
    hour
    Hour at alarm occurring (0-23)
    minute
    Minute at alarm occurring (0-59)
    second
    Second at alarm occurring (0-59)
    almnum
    Alarm number (0-65535)
    psec
    Progress time(second) (0-0xFFFFFFFF)
    hpc
    Peak power (0-7000)
    hfq
    Pulse frequency (0-2000)
    hdt
    Pulse duty (0-100)
    hpa
    Actual power (0-7000)
    hce
    Power compensation coefficient (0-65535)
    asq
    Sequence number at alarm occurring (0-255)
    psu
    Power supply flag at alarm occurring
    #0 : PSU1 (Power supply 1)
    #1 : PSU2 (Power supply 2)
    : :
    #7 : PSU8 (Power supply 8)
    (In case of alarm is 0)
    aps
    Power supply select flag
    #0 : PSU1 (Power supply 1)
    #1 : PSU2 (Power supply 2)
    : :
    #7 : PSU8 (Power supply 8)
    dummy
    uunused
    rfi[8]
    RF current(RFI) (0-65535) 8 data at each power supply.
    rfv[8]
    RF voltage(RFV) (0-65535) 8 data at each power supply.
    dci[8]
    DC current(DCI) (0-65535) 8 data at each power supply.
    dcv[8]
    DC voltage(DCV) (0-65535) 8 data at each power supply.
    dcw[8]
    DC power(DCW) (0-65535) 8 data at each power supply.
    almcd[8]
    Power supply alarm code(0-255) 8 data at each power supply.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlactnum

    Reads the active cutting number, active piercing number and active slope number.

    The data is stored in each member of the ODBLACTN structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlactnum(unsigned short FlibHndl, ODBLACTN *actno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    actno out

    Pointer to the ODBLACTN structure including the active cutting number, active piercing number and active slope number. The ODBLACTN structure is as follows.

    typedef struct odblactn {
        short   slct;       /* Flag of valid data */
        short   act_proc;   /* Active cutting number */
        short   act_pirce;  /* Active piercing number */
        short   act_slop;   /* Active slope number (Series 30i/31i-LB cannot be used.) */
        short   reserve[5]; /* (reserve) */
    } ODBLACTN ;
    
    slct
    Flag of valid data is set.
    bit 0 : Active cutting number
    bit 1 : Active piercing number
    bit 2 : Active slope number(Series 30i/31i-LB cannot be used.)
    bit 3,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    act_proc
    Active cutting number is set.
    ・Series 16i/18i-L
    (Output range: 1 to 10, Unit: none)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Output range: 1 to 10, Unit: none)
    When addition of the cutting condition data option is provided.
    (Output range: 1 to 30, Unit: none)
    act_price
    Active piercing number is set.
    ・Series 16i/18i-L
    (Output range: 101 to 103, Unit: none)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Setting range: 101 to 103)
    When addition of the cutting condition data option is provided.
    (Setting range: 101 to 110)
    act_slope
    Active slope number is set.
    ・Series 16i/18i-L
    (Output range: 301 to 305, Unit: none)
    ・Series 30i/31i-LB
    Series 30i/31i-LB cannot be used.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L、30i/31i-LB.
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlagslt

    Reads the assist gas selection of laser setting data.

    The data is stored in each member of the IODBLAGSL structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlagslt(unsigned short FlibHndl, IODBLAGSL *agslt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    agslt out

    Pointer to the IODBLAGSL structure including the assist gas selection of laser setting data. The IODBLAGSL structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodblagsl {
        short   slct;       /* Flag of valid data */
        short   ag_slt;     /* Assist gas selection */
        short   agflow_slt; /* Assist gas flow selection */
        short   reserve[6]; /* (reserve) */
    } IODBLAGSL ;
    ・Series 30i/31i-LB
    typedef struct iodblagsl {
        short   slct;       /* Flag of valid data                */
        short   ag_slt;     /* Assist gas selection              */
        short   agflow_slt; /* Series 30i/31i-LB cannot be used. */
        short   ag_press;   /* Assist gas pressure               */
        short   ag_ready_t; /* Gas setting time                  */
        short   reserve[4]; /* (reserve)                         */
    } IODBLAGSL ;
    
    
    slct
    Flag of valid data is set.
    ・Series 16i/18i-L
    bit0 : Assist gas selection
    bit1 : Assist gas flow selection
    bit 2,..,7 : (reserve)
    bit 8,..,15 : (not used)
    ・Series 30i/31i-LB
    bit0 : Assist gas selection
    bit1 : Series 30i/31i-LB cannot be used.
    bit2 : Assist gas pressure
    bit3 : Gas setting time
    bit 4,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    ag_slt
    Assist gas selection is set.
    agflow_slt
    Series 16i/18i-L
    Assist gas flow selection is set.
    Series 30i/31i-LB
    Series 30i/31i-LB cannot be used.
    ag_press
    ・Series 30i/31i-LB only
    Assist gas pressure is set.
    It corresponds to parameter No.15136.
    ag_ready_t
    ・Series 30i/31i-LB only
    Gas setting time is set.
    It corresponds to parameter No.15135.
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlagst

    Reads the assist gas flow of laser setting data.

    The data is stored in each member of the IODBLAGST structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlagst(unsigned short FlibHndl, IODBLAGST *agst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    agst out

    Pointer to the IODBLAGST structure including the assist gas flow of laser setting data. The IODBLAGST structure is as follows.

    typedef struct iodblagst {
        struct {
            short   slct;       /* Flag of valid data */
            short   pre_time;   /* Time for previous step */
            short   pre_press;  /* Pressure in previous step */
            short   proc_press; /* Machining pressure */
            short   end_time;   /* Time for subsequent step */
            short   end_press;  /* Pressure in subsequent step */
            short   reserve[3]; /* (reserve) */
        } gasflow[3] ;
    } IODBLAGST ;
    
    agst.gasflow[0] : Assist gas flow 1
    agst.gasflow[1] : Assist gas flow 2
    agst.gasflow[2] : Assist gas flow 3
    slct
    Flag of valid data is set.
    bit 0 : Time for previous step
    bit 1 : Pressure in previous step
    bit 2 : Machining pressure
    bit 3 : Time for subsequent step
    bit 4 : Pressure in subsequent step
    bit 5,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    pre_time
    Time for previous step is set.
    pre_press
    Pressure in previous step is set.
    proc_press
    Machining pressure is set.
    end_time
    Time for subsequent step is set.
    end_press
    Pressure in subsequent step is set.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_rdlcmddat

    Reads the command data of laser.

    The data is stored in each member of the ODBLCMDT user define type.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlcmddat(unsigned short FlibHndl, ODBLCMDT *cmddat);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    cmddat out

    Pointer to the ODBLCMDT structure including the command data of laser. The ODBLCMDT structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodblcmdt {
        short   slct;      /* Flag of valid data */
        long    feed;      /* Actual feedrate */
        short   power;     /* Actual peak power */
        short   freq;      /* Actual pulse frequency */
        short   duty;      /* Actual pulse duty */
        short   g_kind;    /* Command data of assist gas select */
        short   g_ready_t; /* Assist gas time */
        short   g_press;   /* Actual assist gas pressure */
        short   error;     /* Command data of reference displace */
        long    dsplc;     /* Command data of tool radius offset */
        short   reserve[7];/* (reserve) */
    } ODBLCMDT ;
    
    ・Series 30i/31i-LB
    typedef struct iodblcmdt {
        short   slct;       /* Flag of valid data                   */
        long    feed;       /* Actual feedrate                      */
        short   power;      /* Actual peak power                    */
        short   freq;       /* Actual pulse frequency               */
        short   duty;       /* Actual pulse duty                    */
        short   g_kind;     /* Command data of assist gas select    */
        short   g_ready_t;  /* Assist gas time                      */
        short   g_press;    /* Actual assist gas pressure           */
        short   error;      /* Command data of reference displace   */
        long    dsplc;      /* Command data of tool radius offset   */
        long    error2;    /* Command data of reference displace 2 */
        char    gap_axis;  /* Gap control axis                     */
        char    feed_dec;  /* Decimals places                      */
        char    dsplc_dec; /* Decimals places                      */
        char    error2_dec;/* Decimals places                      */
        short   reserve[3]; /* (reserve)                            */
    } ODBLCMDT ;
    
    slct
    Flag of valid data is set.
    bit 0 : Actual feedrate
    bit 1 : Actual peak power
    bit 2 : Actual pulse frequency
    bit 3 : Actual pulse duty
    bit 4 : Command data of assist gas select
    bit 5 : Assist gas time
    bit 6 : Actual assist gas pressure
    bit 7 : Command data of reference displace
    bit 8 : Command data of tool radius offset
    bit 9,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    feed
    Actual feedrate is set.
    power
    Actual peak power is set.
    freq
    Actual pulse frequency is set.
    duty
    Actual pulse duty is set.
    g_kind
    Command data of assist gas select is set.
    g_ready_t
    Assist gas time is set.
    g_press
    Actual assist gas pressure is set.
    error
    Command data of reference displace is set.
    dsplc
    Command data of tool radius offset is set.
    error2
    ・Series 30i/31i-LB only
    Command data of reference displace 2 is set.
    gap_axis
    ・Series 30i/31i-LB only
    Whether The first gap control axis axis or The second gap control axis axis is commanded as a gap control axis is set.
    The meaning of a set value of gap_axis is shown in the following table.
      gap_axis Setting of the gap control axis
      0 The second gap control axis.
      1 The first gap control axis.
      -1 The gap control is invalid.
    feed_dec
    ・Series 30i/31i-LB only
    decimals places in Actual feedrate is set.
    dsplc_dec
    ・Series 30i/31i-LB only
    decimals places in Command data of tool radius offset is set.
    error2_dec
    ・Series 30i/31i-LB only
    decimals places in Command data of reference displace is set.
    The corresponding data is as follows.
      小数点以下桁数部 対応するデータ部
      feed_dec feed
      dsplc_dec dsplc
      error2_dec error2
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlcmmt

    Reads the comment data of laser.

    The data is stored in 'comment' of the ODBLCMMT structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlcmmt(unsigned short FlibHndl, ODBLCMMT *comment);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    comment out

    Pointer to the ODBLCMMT structure including the comment data of laser. The ODBLCMMT structure is as follows.

    typedef struct odblcmmt {
        char    comment[25];        /* Comment data */
    }ODBLCMMT ;
    
    comment
    Comment data is set.This data is terminated with 'NULL'.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_LENGTH Data block length error
    The length of a comment exceeds 24 bytes.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdldsplc

    Reads the command data of reference displace.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdldsplc(unsigned short FlibHndl, short *dsplc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsplc out

    Pointer to the variable for the command data of reference displace.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_rdldsplc2

    Reads the standard displacement. Each data is stored in the members within IODBDSPLC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdldsplc2(unsigned short FlibHndl, IODBDSPLC *dsplc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsplc in

    A pointer to the IODBDSPLC structure in which to return the standard displacement. The IODBDSPLC structure is as follows.

    typedef struct iodbdsplc {
        short   slct;       /* Flag of valid data    */
        long    dsplc;      /* Standard displacement */
        short   dsplc_dec;  /* Decimals places       */
        char    reserve;    /* (reserve)             */
        short   reserves[4];/* (reserve)             */
    } IODBDSPLC ;
    
    slct
    Flag of valid data is set.
    bit 0 Standard displacement
    bit1,..,15 (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    dsplc
    The standard displacement is set.
    (Setting range:parameter No. 15531 to No. 15532 ,Unit:mm、inch)
    dsplc_dec
    The number of decimals places at dsplc (the standard displacement) is set.
    (Setting range:0 〜 9)
    The corresponding data is as follows.
      decimals places corresponding data
      dsplc_dec dsplc
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdledgprc

    Reads the laser power for contouring.

    The data is stored in each member of the IODBLEGPR structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdledgprc(unsigned short FlibHndl, IODBLEGPR *edgepr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    edgepr out

    Pointer to the IODBLEGPR structure including the laser power for contouring. The IODBLEGPR structure is as follows.

    typedef struct iodblegpr {
        short   slct;       /* Flag of valid data */
        short   power;      /* Peak power */
        short   freq;       /* Pulse frequency */
        short   duty;       /* Pulse duty */
        short   reserve[5]; /* (reserve) */
    } IODBLEGPR ;
    
    slct
    Flag of valid data is set.
    bit 0 : Peak power
    bit 1 : Pulse frequency
    bit 2 : Pulse duty
    bit 3,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    power
    Peak power is set.
    freq
    Pulse frequency is set.
    duty
    Pulse duty is set.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlerrz

    Reads the error of Z-axis tracing.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlerrz(unsigned short FlibHndl, short *errz);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    errz out

    Pointer to the variable for the error of Z-axis tracing.
    (Output range: -10000 to 10000, Unit: 0.001mm)
    (Output range: -3938 to 3938, Unit: 0.0001inch)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlppfbdt

    Reads the data which the function of actual output estimation type pulse power feedback use. The data is stored in each member of the IODBLPPFBDT structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlppfbdt(unsigned short FlibHndl, IDBLPPFBFG *rflag, short *number, IODBLPPFBDT *lppfbdt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    rflag in

    Specifies a pointer to the structure in which to specify the kind and range of data to read. Sets the beginning / finish number which read, when you specify the command value of pulse frequency, the command value of duty cycle, and the actual power.

    typedef struct idblppfbfg {
        short   s_no;           /* The group number of data to read.                  */
        short   slct;           /* The kind of data to read.                          */
        short   s_freq;         /* The pulse frequency number which begins to read.   */
        short   e_freq;         /* The pulse frequency number which finishes to read. */
        short   s_duty;         /* The duty cycle number which begins to read.        */
        short   e_duty;         /* The duty cycle number which finishes to read.      */
    } IDBLPPFBFG ;
    

    s_no
    The group number of command data at peak power to read is set.
    [Setting range] 0 to 7
    slct
    The kind of data to read is set.
    The meaning which correspond to each bit of this flag is as follows.
    Each data can be acquired when the bit corresponding to data has been 1.
    The data is invalid when the bit corresponding to data is 0.
    bit 0 The command value of peak power
    bit 1 The command value of pulse frequency
    bit 2 The command value of duty cycle
    bit 3 The actual power
    bit 4,..,15 Unused.
    s_freq
    The pulse frequency number which begins to read is set.
    When s_freq is -1, all the data of pulse frequency can be read.
    [Setting range] -1, 0 to 9
    e_freq
    The pulse frequency number which finishes to read is set.
    When s_freq is -1, e_freq is invalid.(e_freq can be used, when s_freq is 0 to 9)
    [Setting range] 0 to 9
    s_duty
    The duty cycle number which begins to read is set.
    When s_duty is -1, all the data of duty cycle can be read.
    [Setting range] -1, 0 to 9
    e_duty
    The duty cycle number which finishes to read is set.
    When s_duty is -1, e_duty is invalid.(e_duty can be used, when s_duty is 0 to 9)
    [Setting range] 0 to 9
    The data within the range specified for actual output estimation type pulse power feedback by s_freq, e_freq, s_duty, and e_duty is read.

    number in/out

    Specifies a pointer to the group number of data of actual output estimation type pulse power feedback to read. Specifies the number to read before calling the function. The number which actually read after calling the function is set. (specify 1 to 8 for the number)

    lppfbdt out

    A pointer to the IODBLPPFBDT structure in which to return the group data of actual output estimation type pulse power feedback to read. The data of this structure prepare the number specified by "number". The IODBLPPFBDT structure is as follows.

    typedef struct iodblppfbdt {
        short   ppower;         /* The peak power.     */
        short   dummy;          /* The dummy variable. */
        short   freq[10];       /* The pulse frequency */
        short   duty[10];       /* The duty cycle      */
        short   rpower[10][10]; /* The actual power.   */
    } IODBLPPFBDT ;
    

    ppower
    The command value of peak power is set.
    [Unit] W
    [Setting range] 0 to 9999
    dummy
    The dummy variable.
    freq[10]
    The command value of pulse frequency is set.
    [Unit] Hz
    [Setting range] 1 to 32767
    When rflag.s_duty is 2 and rflag.e_duty is 4, the value is set from duty[2] to duty[4].
    duty[10]
    The command value of duty cycle is set.
    [Unit] %
    [Setting range] 0 to 100
    When rflag.s_duty is 2 and rflag.e_duty is 4, the value is set from duty[2] to duty[4].
    rpower[10][10]
    The actual power is set.
    [Unit] W
    [Setting range] -32768 to 32767
    [ i ][ j ] i : The number of duty cycle. , j : The number of pulse frequency.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 Error in the group number of data (s_no) to read.
    2 Error in the kind of data (slct) to read.
    3 Error in the pulse frequency number which begins (s_freq) to read.
    4 Error in the pulse frequency number which finishes (e_freq) to read.
    5 Error in the duty cycle number which begins (s_duty) to read.
    6 Error in the duty cycle number which finishes (e_duty) to read.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030) The actual output estimation type pulse power feedback function is invalid.(Parameter PFB(No.29000#0) mistake)

    laser\cnc_rdlprcprc

    Reads the laser power for piercing.

    The data is stored in each member of the IODBLPCPR structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlprcprc(unsigned short FlibHndl, IODBLPCPR *pierpr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pierpr out

    Pointer to the IODBLPCPR structure including the laser power for piercing. The IODBLPCPR structure is as follows.

    typedef struct iodblpcpr {
        short   slct;       /* Flag of valid data */
        short   power;      /* Piercing initial peak power */
        short   freq;       /* Piercing initial pulse frequency */
        short   duty;       /* Piercing initial pulse duty */
        long    time;       /* Piercing time */
        short   reserve[4]; /* (reserve) */
    } IODBLPCPR ;
    
    slct
    Flag of valid data is set.
    bit 0 : Piercing initial peak power
    bit 1 : Piercing initial pulse frequency
    bit 2 : Piercing initial pulse duty
    bit 3 : Piercing time
    bit 4,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    power
    Piercing initial peak power is set.
    freq
    Piercing initial pulse frequency is set.
    duty
    Piercing initial pulse duty is set.
    time
    Piercing time is set.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlpscdpwrctl

    Reads the item of setting screen at power control. Each data is stored in the members within IODBPWRCTL.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpscdpwrctl(unsigned short FlibHndl,short s_no, short *number, IODBPWRCTL *pwrctl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    The data group number to read is set.

    901 to 910 power control data group number

    number in/out

    A pointer to the number of data items in power control is set. Specifies the number to read before calling the function. The number which actually read after calling the function is set.

    pwrctl out

    A pointer to the IODBPWRCTL structure in which to return the data group of power control. The IODBPWRCTL structure is as follows.

    typedef struct iodbpwrctl {
        short    slct;          /* Flag of valid data                       */
        short    power_min;     /* Minimum peak power                       */
        short    pwr_sp_zr;     /* Peak power at feed rate = 0              */
        short    freq_min;      /* Minimum pulse frequency                  */
        short    freq_sp_zr;    /* Frequency at feed rate = 0               */
        short    duty_min;      /* Minimum pulse duty                       */
        short    duty_sp_zr;    /* Pulse duty at feed rate = 0              */
        char     feed_r_dec;    /* Decimals places                          */
        char     reserve;       /* (reserve)                                */
        long     feed_r;        /* Allowable width of feed rate fluctuation */
        short    reserves[7];   /* (reserve)                                */
    } IODBPWRCTL ;
    
    slct
    Flag of valid data is set.
    bit 0 Minimum peak power
    bit 1 Peak power at feed rate = 0
    bit 2 Minimum pulse frequency
    bit 3 Frequency at feed rate = 0
    bit 4 Minimum pulse duty
    bit 5 Pulse duty at feed rate = 0
    bit 6 Allowable width of feed rate fluctuation
    bit 7,..,15 (reserve)
    * When a bit is 0, it means the corresponding data hasno meaning.
    power_min
    The minimum peak power (clamp value) is set.
    (Setting range:0 to 9999,Unit:W)
    pwr_sp_zr
    The peak power at feed rate = 0 is set.
    (Setting range:0 to 9999,Unit:W)
    freq_min
    The minimum pulse frequency is set.
    (Setting range:1 to 32767,Unit:Hz)
    freq_sp_zr
    The pulse frequency at feed rate = 0 is set.
    (Setting range:1 to 32767,Unit:Hz)
    duty_min
    The minimum pulse duty is set.
    (Setting range:0 to 100,Unit:%)
    duty_sp_zr
    The pulse duty at feed rate = 0 is set.
    (Setting range:0 to 100,Unit:%)
    feed_r_dec
    The number of decimals places at allowable width of feed rate fluctuation is set.
    (Setting range:0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      feed_r_dec feed_r
    reserve
    (reserve)
    feed_r
    The allowable width of feed rate fluctuation is set.
    (Setting range:0 to 999999999,Unit:mm、inch(input unit))
    reserves
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlpwrcpst

    Reads the power compensation coefficient.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpwrcpst(unsigned short FlibHndl, short *pwrcpst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrcpst out

    Pointer to the variable for the power compensation coefficient.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_rdlpwrctrl

    Reads the on/off of laser power control.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpwrctrl(unsigned short FlibHndl, short *pwrctrl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrctrl out Pointer to the variable for the on/off of laser power control. The following status is set.
    0 : Off (unavailable)
    1 : On (available)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlpwrdat

    Reads the laser power data.

    The data is stored in each member of the ODBLOPDT structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpwrdat(unsigned short FlibHndl, ODBLOPDT *pwrdat);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrdat out

    Pointer to the ODBLOPDT structure including the laser power data. The ODBLOPDT structure is as follows.

    ・Series 16i/18i-L
    typedef struct odblopdt {
        short   slct;       /* Flag of valid data */
        short   pwr_mon;    /* Power monitor value */
        short   pwr_ofs;    /* Power offset */
        short   pwr_act;    /* Actual laser power */
        long    feed_act;   /* Actual feedrate */
        short   reserve[4]; /* (reserve) */
    } ODBLOPDT ;
    
    ・Series 30i/31i-LB
    typedef struct odblopdt {
        short   slct;       /* Flag of valid data  */
        short   pwr_mon;    /* Power monitor value */
        short   pwr_ofs;    /* Power offset        */
        short   pwr_act;    /* Actual laser power  */
        long    feed_act;   /* Actual feedrate     */
        char    feed_dec;   /* Decimals places     */
        char    reserve;    /* (reserve)           */
        short   reserves[3];/* (reserve)           */
    } ODBLOPDT ;
    
    slct
    Flag of valid data is set.
    bit 0 : Power monitor value
    bit 1 : Power offset
    bit 2 : Actual laser power
    bit 3 : Actual feedrate
    bit 4,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    pwr_mon
    Power monitor value is set.
    pwr_ofs
    Power offset is set.
    pwr_act
    Actual laser power is set.
    feed_act
    Actual feedrate is set.
    feed_dec
    ・Series 30i/31i-LB only
    decimals places in Actual feedrate is set.
    reserve
    (rerserve)
    reserves
    ・Series 30i/31i-LB only
    (rerserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlpwrdty

    Reads the duty data for power control.

    The data is stored in each member of the IODBLPWDT structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpwrdty(unsigned short FlibHndl,IODBLPWDT *pwrdty);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrdty out

    Pointer to the IODBLPWDT structure including the duty data for power control. The IODBLPWDT structure is as follows.

    typedef struct iodblpwdt {
        short   slct;      /* Flag of valid data */
        short   dty_const; /* Constant of duty for power control (Series 30i/31i-LB cannot be used.) */
        short   dty_min;   /* Minimum duty for power control */
        short   reserve[6];/* (reserve) */
    } IODBLPWDT ;
    
    slct
    Flag of valid data is set.
    bit0 : Constant of duty for power control(Series 30i/31i-LB cannot be used.)
    bit1 : Minimum duty for power control
    bit 2,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    dty_const
    Constant of duty for power control is set.(Series 30i/31i-LB cannot be used.)
    dty_min
    Minimum duty for power control is set.
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdlpwrslt

    Reads the number of power devices (the number of effective discharge tubes).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlpwrslt(unsigned short FlibHndl, short *pwrslt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrslt out Pointer to the variable for the number of power devices (the number of effective discharge tubes). The following status is set.
    0 : All tubes are used.
    1 : Half of the tubes are used.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16ii/18i-L、30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdmngtime

    Reads the management time data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmngtime(unsigned short FlibHndl, long s_no, long *number, IODBMNGTIME *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the reading start number of management time data. (0,1,2,...)

    number in/out

    Specify the pointer to the variable where the number of management time which wants to be acquired was setted.
    This function returns the number of data which was read actually.

    data out

    Specify the pointer to the array of IODBMNGTIME structure to store the management time data. The number of array must be equal to "number".
    The IODBMNGTIME structure is as follows.

    typedef struct iodbmngtime {
        unsigned long    life;   /* Setted life(setting time) */
        unsigned long    total;  /* Total management time(managemant time) */
    } IODBMNGTIME;
    
    life
    Setted life(setting time) (0〜99999999)
    total
    Total management time(managemant time) (0〜99999999)

    setting unit 1 = 0.1 hour
    * When the setted life is "0", the management time is not counted.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdpscdedge

    Reads the edge cutting data of the cutting condition file.

    The data is stored in each member of the IODBEDGE structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpscdedge(unsigned short FlibHndl,short s_no, short *number, IODBEDGE *edge);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start edge cutting data group number.

    201 to 205 : edge cutting data group number

    number in/out

    Pointer to the number of edge cutting data. Specify the number of edge cutting data to be read before function call, and the number of edge cutting data being read actually is stored after the function call.

    edge out

    Pointer to the IODBEDGE structure including the edge cutting data of the cutting condition file. The IODBEDGE structure is as follows.

    typedef struct iodbedge {
        short   slct;       /* Flag of valid data */
        short   angle;      /* Judge angle for edge */
        short   power;      /* Piercing power */
        short   freq;       /* Piercing frequency */
        short   duty;       /* Piercing duty */
        long    pier_t;     /* Piercing time */
        short   g_press;    /* Piercing gas press */
        short   g_kind;     /* Piercing gas select */
        long    r_len;      /* Recovery distance */
        short   r_feed;     /* Recovery feedrate */
        short   r_freq;     /* Recovery frequency */
        short   r_duty;     /* Recovery duty */
        short   gap;        /* Deflection/gap */
        short   reserve[4]; /* (reserve) */
    } IODBEDGE ;
    
    slct
    Flag of valid data is set.
    bit 0 : Judge angle for edge
    bit 1 : Piercing power
    bit 2 : Piercing frequency
    bit 3 : Piercing duty
    bit 4 : Piercing time
    bit 5 : Piercing gas press
    bit 6 : Piercing gas select
    bit 7 : Recovery distance
    bit 8 : Recovery feedrate
    bit 9 : Recovery frequency
    bit10 : Recovery duty
    bit11 : Deflection/gap
    bit12,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data hasno meaning.
    angle
    Judge angle for edge is set.
    (Setting range: 0 to 180, Unit: degree)
    power
    Piercing power (peak value) is set.
    (Setting range: 0 to 9999, Unit: W)
    freq
    Piercing frequency is set.
    (Setting range: 5 to 2000, Unit: Hz)
    duty
    Piercing duty is set.
    (Setting range: 0 to 100, Unit: %)
    pier_t
    Piercing time is set.
    (Setting range: 0 to 999999, Unit: 0.001sec.)
    g_press
    Piercing gas press (assist gas pressure) is set
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    g_kind
    Piercing gas select (kind of assist gas) is set
    (Setting range: 1 to 7, Unit: kind)
    r_len
    Recovery distance is set.
    (Setting range: 0 to 99999, Unit: 0.001mm)
    r_feed
    Recovery feedrate is set.
    (Setting range: 0 to 9999, Unit: mm/min)
    r_freq
    Recovery frequency is set.
    (Setting range: 5 to 2000, Unit: Hz)
    r_duty
    Recovery duty is set.
    (Setting range: 0 to 100, Unit: %)
    gap
    Deflection/gap is set.
    (Setting range: -32767 to 32767)
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary.

    laser\cnc_rdpscdedge2

    Reads the edge cutting data in the cutting conditions file. Each data is stored in the members within IODBEDGE2.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpscdedge2(unsigned short FlibHndl,short s_no, short *number, IODBEDGE2 *edge2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    The data group number to read is set.

    When addition of the cutting condition data option is not provided.

    201 to 205  edge cutting data group number

    When addition of the cutting condition data option is provided.

    201 to 220  edge cutting data group number

    number in/out

    A pointer to the number of data items in edge cutting is set. Specifies the number to read before calling the function. The number which actually read after calling the function is set.

    edge2 out

    A pointer to the IODBEDGE2 structure in which to return the data group of edge cutting. The IODBEDGE2 structure is as follows.

    typedef struct iodbedge2 {
        short    slct;          /* Flag of valid data              */
        short    power;         /* Peak power in piercing          */
        short    freq;          /* Frequency in piercing           */
        short    duty;          /* Duty in piercing                */
        short    g_press;       /* Assist gas pressure in piercing */
        short    g_kind;        /* Assist gas type in piercing     */
        long     pier_t;        /* Time in piercing                */
        long     angle;         /* Edge operation angle            */
        long     gap;           /* Standard displacement           */
        long     r_len;         /* Return distance                 */
        long     r_feed;        /* Return speed                    */
        short    r_freq;        /* Return frequency                */
        short    r_duty;        /* Return pulse duty               */
        char     gap_axis;     /* Gap control axis                */
        char     angle_dec;     /* Ddecimals places                */
        char     gap_dec;       /* Ddecimals places                */
        char     r_len_dec;     /* Ddecimals places                */
        char     r_feed_dec;    /* Ddecimals places                */
        char     reserve;      /* (reserve)                       */
        short    reserves[3];   /* (reserve)                       */
    } IODBEDGE2 ;
    
    slct
    Flag of valid data is set.
    bit 0 Edge operation angle
    bit 1 Peak power in piercing
    bit 2 Frequency in piercing
    bit 3 Duty in piercing
    bit 4 Time in piercing
    bit 5 Assist gas pressure in piercing
    bit 6 Assist gas type in piercing
    bit 7 Return distance
    bit 8 Return speed
    bit 9 Return frequency
    bit10 Return pulse duty
    bit11 Standard displacement
    bit12 Gap control axis
    bit13,..,15 (reserve)
    * When a bit is 0, it means the corresponding data hasno meaning.
    power
    The value of peak power in piercing is set.
    (Setting range:0 to 9999,Unit:W)
    freq
    The pulse frequency in piercing is set.
    (Setting range:1 to 32767,Unit:Hz)
    duty
    The pulse duty in piercing is set.
    (Setting range:0 to 100,Unit:%)
    g_press
    The assist gas pressure in piercing is set.
    (Setting range:0 to 9999,Unit:0.01MPa、0.1Kg/cm2)
    g_kind
    The assist gas type in piercing is set.
    (Setting range:0 to 15,Unit:kind)
    pier_t
    The time in piercing is set.
    (Setting range:0 to 999999,Unit:0.001sec)
    angle
    The edge operation angle is set.
    (Setting range:0 to 999999999,Unit:degree)
    gap
    The standard displacement is set.
    (Setting range:-999999999 to 999999999, Unit:mm/min(input unit))
    r_len
    The return distance is set.
    (Setting range:-999999999 to 999999999,Unit:mm、inch(input unit))
    r_feed
    The return speed is set.
    (Setting range:0 to 999999999,Unit:mm/min, inch/min(input unit))
    r_freq
    The return frequency is set.
    (Setting range:1 to 32767,Unit:Hz)
    r_duty
    The return pulse duty is set.
    (Setting range:0 to 100,Unit:%)
    gap_axis
    Whether The first gap control axis axis or The second gap control axis axis is commanded as a gap control axis is set.
    The meaning of a set value of gap_axis is shown in the following table.
      gap_axis Setting of the gap control axis
      0 The second gap control axis.
      1 The first gap control axis.
      -1 The gap control is invalid.
    angle_dec
    The number of decimals places at edge operation angle is set.
    (Setting range:0 to 9)
    gap_dec
    The number of decimals places at standard displacement is set.
    (Setting range:0 to 9)
    r_len_dec
    The number of decimals places at return distance is set.
    (Setting range:0 to 9)
    r_feed_dec
    The number of decimals places at return speed is set.
    (Setting range:0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      angle_dec angle
      gap_dec gap
      r_len_dec r_len
      r_feed_dec r_feed
    reserve
    (reserve)
    reserves
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdpscdpirc

    Reads the piercing data of the cutting condition file.

    The data is stored in each member of the IODBPIRC structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpscdpirc(unsigned short FlibHndl,short s_no, short *number, IODBPIRC *pircing);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start piercing data group number.

    ・Series 16i/18i-L

    101 to 103 : piercing data group number

    ・Series 30i/31i-LB

    When addition of the cutting condition data option is not provided.

    101 to 103 piercing data group number

    When addition of the cutting condition data option is provided.

    101 to 110 piercing data group number

    number in/out

    Pointer to the number of piercing data. Specify the number of piercing data to be read before function call, and the number of piercing data being read actually is stored after the function call.

    pircing out

    Pointer to the IODBPIRC structure including the piercing data of the cutting condition file. The IODBPIRC structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodbpirc {
        short   slct;       /* Flag of valid data */
        short   power;      /* Peak power */
        short   freq;       /* Initial frequency */
        short   duty;       /* Initial duty */
        short   i_freq;     /* Step frequency */
        short   i_duty;     /* Step duty */
        short   step_t;     /* Step time */
        short   step_sum;   /* Step number */
        long    pier_t;     /* Piercing time */
        short   g_press;    /* Assist gas pressure */
        short   g_kind;     /* Assist gas select */
        short   g_time;     /* Assist gas setting time */
        short   def_pos;    /* Reference displace */
        short   reserve[4]; /* (reserve) */
    } IODBPIRC ;
    ・Series 30i/31i-LB
    typedef struct iodbpirc {
        short   slct;        /* Flag of valid data      */
        short   power;       /* Peak power              */
        short   freq;        /* Initial frequency       */
        short   duty;        /* Initial duty            */
        short   i_freq;      /* Step frequency          */
        short   i_duty;      /* Step duty               */
        short   step_t;      /* Step time               */
        short   step_sum;    /* Step number             */
        long    pier_t;      /* Piercing time           */
        short   g_press;     /* Assist gas pressure     */
        short   g_kind;      /* Assist gas select       */
        short   g_time;      /* Assist gas setting time */
        short   def_pos;     /* Reference displace      */
        long    def_pos2;    /* Reference displace 2    */
        char    gap_axis;    /* Gap control axis        */
        char    def_pos2_dec;/* Decimals places         */
        short   reserve;     /* (reserve)               */
    } IODBPIRC ;
    
    
    slct
    Flag of valid data is set.
    ・Series 16i/18i-L
    bit 0 : Peak power
    bit 1 : Initial frequency
    bit 2 : Initial duty
    bit 3 : Step frequency
    bit 4 : Step duty
    bit 5 : Step time
    bit 6 : Step number
    bit 7 : Piercing time
    bit 8 : Assist gas pressure
    bit 9 : Assist gas select
    bit10 : Assist gas setting time
    bit11 : Reference displace
    bit12,..,15 : (reserve)
    ・Series 30i/31i-LB
    bit 0 : Peak power
    bit 1 : Initial frequency
    bit 2 : Initial duty
    bit 3 : Step frequency
    bit 4 : Step duty
    bit 5 : Step time
    bit 6 : Step number
    bit 7 : Piercing time
    bit 8 : Assist gas pressure
    bit 9 : Assist gas select
    bit10 : Assist gas setting time
    bit11 : Reference displace
    bit12 : Reference displace 2
    bit13 : Gap control axis
    bit14,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    power
    Peak power is set.
    (Setting range: 0 to 9999, Unit: W)
    freq
    Initial frequency is set.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 1 to 3276, Unit: Hz)
    duty
    Initial duty is set.
    (Setting range: 0 to 100, Unit: %)
    i_freq
    Step frequency is set.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 0 to 32767, Unit: Hz)
    i_duty
    Step duty is set.
    (Setting range: 0 to 99, Unit: %)
    step_t
    Step time is set.
    (Setting range: 0 to 9999, Unit: 0.001second)
    step_sum
    Step number is set.
    (Setting range: 0 to 99, Unit: time)
    pier_t
    Piercing time is set.
    (Setting range: 1 to 999999, Unit: 0.001sec.)
    g_press
    Assist gas pressure is set.
    ・Series 16i/18i-L
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    ・Series 30i/31i-LB
    (Setting range: 0 to 9999, Unit: 0.01MPa, 0.1Kg/cm2)
    g_kind
    Assist gas select is set.
    ・Series 16i/18i-L
    (Setting range: 1 to 7, Unit: kind)
    ・Series 30i/31i-LB
    (Setting range: 1 to 15, Unit: kind)
    g_time
    Assist gas setting time is set.
    (Setting range: 0 to 99, Unit: 0.1second)
    def_pos
    Reference displace is set.
    (Setting range: -32767 to 32767, Unit: 0.001mm)
    def_pos2
    ・Series 30i/31i-LB only
    Reference displace 2 is set.
    (Setting range: -999999999 to 999999999, Unit: mm, inch(input unit))
    gap_axis
    ・Series 30i/31i-LB only
    Whether The first gap control axis axis or The second gap control axis axis is commanded as a gap control axis is set.
    The meaning of a set value of gap_axis is shown in the following table.
      gap_axis Setting of the gap control axis
      0 The second gap control axis.
      1 The first gap control axis.
      -1 The gap control is invalid.
    def_pos2_dec
    ・Series 30i/31i-LB only
    decimals places in Reference displace 2 is set.
    (Setting range: 0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      def_pos2_dec def_pos2
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdpscdproc

    Reads the cutting data of the cutting condition file.

    The data is stored in each member of the IODBPSCD structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpscdproc(unsigned short FlibHndl,short s_no, short *number, IODBPSCD *pscd);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start cutting data group number.

    ・Series 16i/18i-L

    1 to 10 : cutting data group number

    ・Series 30i/31i-LB

    When addition of the cutting condition data option is not provided.

    1 to 10 cutting data group number

    When addition of the cutting condition data option is provided.

    1 to 30 cutting data group number

    number in/out

    Pointer to the number of cutting data. Specify the number of cutting data to be read before functioncall, and the number of cutting data being read actually is stored after the function call.

    pscd out

    Pointer to the IODBPSCD structure including the cutting data of the cutting condition file. The IODBPSCD structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodbpscd {
        short   slct;       /* Flag of valid data */
        long    feed;       /* Feedrate */
        short   power;      /* Cutting peak power */
        short   freq;       /* Cutting frequency */
        short   duty;       /* Cutting duty */
        short   g_press;    /* Assist gas pressure */
        short   g_kind;     /* Assist gas select */
        short   g_ready_t;  /* Gas setting time */
        short   displace;   /* Reference displace */
        long    supple;     /* Beam radius offset */
        short   edge_slt;   /* Edge cutting select */
        short   appr_slt;   /* Start-up select */
        short   pwr_ctrl;   /* Power control */
        short   reserve[4]; /* (reserve) */
    } IODBPSCD ;
    
    ・Series 30i/31i-LB
    typedef struct iodbpscd {
        short   slct;       /* Flag of valid data       */
        long    feed;       /* Feedrate                 */
        short   power;      /* Cutting peak power       */
        short   freq;       /* Cutting frequency        */
        short   duty;       /* Cutting duty             */
        short   g_press;    /* Assist gas pressure      */
        short   g_kind;     /* Assist gas select        */
        short   g_ready_t;  /* Gas setting time         */
        short   displace;   /* Reference displace       */
        long    supple;     /* Beam radius offset       */
        short   edge_slt;   /* Edge cutting select      */
        short   appr_slt;   /* Start-up select          */
        short   pwr_ctrl;   /* Power control            */
        long    displace2;  /* Reference displace       */
        char    gap_axis;   /* Gap control axis         */
        char    feed_dec;   /* Decimals places          */
        char    supple_dec; /* Decimals places          */
        char    dsp2_dec;   /* Decimals places          */
    } IODBPSCD ;
    
    
    slct
    Flag of valid data is set.
    ・Series 16i/18i-L
    bit 0 : Feedrate
    bit 1 : Cutting peak power
    bit 2 : Cutting frequency
    bit 3 : Cutting duty
    bit 4 : Assist gas pressure
    bit 5 : Assist gas select
    bit 6 : Gas setting time
    bit 7 : Reference displace
    bit 8 : Beam radius offset
    bit 9 : Edge cutting select
    bit10 : Start-up select
    bit11 : Power control
    bit12,..,15 : (reserve)
    ・Series 30i/31i-LB
    bit 0 Feedrate
    bit 1 Cutting peak power
    bit 2 Cutting frequency
    bit 3 Cutting duty
    bit 4 Assist gas pressure
    bit 5 Assist gas select
    bit 6 Gas setting time
    bit 7 Reference displace
    bit 8 Beam radius offset
    bit 9 Edge cutting select
    bit10 Start-up select
    bit11 Power control
    bit12 Reference displace2
    bit13 Gap control axis
    bit14,..,15 (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    feed
    Feedrate is set.
    ・Series 16i/18i-L
    (Setting range: 0 to 240000, Unit: mm/min)
    ・Series 30i/31i-LB
    (Setting range: 0 to 999999999, Unit:mm/min、inch/min((input unit)))
    power
    Cutting peak power for contouring is set.
    (Setting range: 0 to 9999, Unit: W)
    freq
    Cutting frequency for contouring is set.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 1 to 32767, Unit:Hz)
    duty
    Cutting duty for contouring is set.
    (Setting range: 0 to 100, Unit: %)
    g_press
    Assist gas pressure is set.
    ・Series 16i/18i-L
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    ・Series 30i/31i-LB
    (Setting range: 0 to 9999, Unit: 0.01MPa, 0.1Kg/cm2)
    g_kind
    Assist gas select is set.
    ・Series 16i/18i-L
    (Setting range: 1 to 7, Unit: kind)
    ・Series 30i/31i-LB
    (Setting range: 1 to 15, Unit: kind)
    g_ready_t
    Gas setting time is set.
    (Setting range: 0 to 99, Unit: 0.1second)
    displace
    Reference displace is set.
    (Setting range: -32767 to 32767, Unit: 0.001mm)
    supple
    Beam radius offset is set.
    ・Series 16i/18i-L
    (Setting range: -9999 to 9999, Unit: 0.001mm)
    ・Series 30i/31i-LB
    (Setting range: -999999999 〜 999999999, Unit: mm, inch(input unit))
    edge_slt
    Edge cutting select is set.
    ・Series 16i/18i-L
    (Setting range: 0, 201 to 205)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Setting range: 0, 201 to 205)
    When addition of the cutting condition data option is provided.
    (Setting range: 0, 201 to 210)
    appr_slt
    Start-up select is set.
    ・Series 16i/18i-L
    (Setting range: 0, 201 to 205)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Setting range: 0, 201 to 205)
    When addition of the cutting condition data option is provided.
    (Setting range: 0, 201 to 210)
    pwr_ctrl
    Power control is set.
    (Setting range: 0, 901 to 910)
    displace2
    ・Series 30i/31i-LB only
    Reference displace 2 is set.
    (Setting range: -999999999 to 999999999, Unit: mm, inch(input unit))
    gap_axis
    ・Series 30i/31i-LB only
    Whether The first gap control axis axis or The second gap control axis axis is commanded as a gap control axis is set.
    The meaning of a set value of gap_axis is shown in the following table.
      gap_axis Setting of the gap control axis
      0 The second gap control axis.
      1 The first gap control axis.
      -1 The gap control is invalid.
    feed_dec
    ・Series 30i/31i-LB only
    decimals places in command value of feed rate is set.
    (Setting range: 0 to 9)
    supple_dec
    ・Series 30i/31i-LB only
    decimals places of beam diameter correction amount is set.
    (Setting range: 0 to 9)
    dsp2_dec
    ・Series 30i/31i-LB only
    decimals places in Reference displace 2 is set.
    (Setting range: 0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      feed_dec feed
      supple_dec supple
      dsp2_dec displace2
    reserve
    ・Series 16i/18i-L only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L , 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_rdpscdslop

    Reads the slope control data of the cutting condition file.

    The data is stored in each member of the IODBSLOP structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpscdslop(unsigned short FlibHndl,short s_no, short *number, IODBSLOP *slope);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start slope control data group number.

    301 to 305 : slope control data group number(UP/DOWN)

    number in/out

    Pointer to the number of slope control data. Specify the number of slope control data to be read before function call, and the number of slope control data being read actually is stored after the function call.

    slope out

    Pointer to the IODBSLOP structure including the slope control data of the cutting condition file. The IODBSLOP structure is as follows.

    typedef struct iodbslop {
        long    slct;       /* Flag of valid data */
        long    upleng;     /* Step(UP) distance */
        short   upsp[10];   /* Step(UP) power 1 to 10 */
        long    dwleng;     /* Step(DOWN) distance */
        short   dwsp[10];   /* Step(DOWN) power 1 to 10 */
        short   reserve[10];/* (reserve) */
    } IODBSLOP ;
    
    slct
    Flag of valid data is set.
    bit 0 : Step(UP) distance
    bit 1 : Step(UP) power 1
    bit 2 : Step(UP) power 2
    bit 3 : Step(UP) power 3
    bit 4 : Step(UP) power 4
    bit 5 : Step(UP) power 5
    bit 6 : Step(UP) power 6
    bit 7 : Step(UP) power 7
    bit 8 : Step(UP) power 8
    bit 9 : Step(UP) power 9
    bit10 : Step(UP) power 10
    bit11 : Step(DOWN) distance
    bit12 : Step(DOWN) power 1
    bit13 : Step(DOWN) power 2
    bit14 : Step(DOWN) power 3
    bit15 : Step(DOWN) power 4
    bit16 : Step(DOWN) power 5
    bit17 : Step(DOWN) power 6
    bit18 : Step(DOWN) power 7
    bit19 : Step(DOWN) power 8
    bit20 : Step(DOWN) power 9
    bit21 : Step(DOWN) power 10
    bit22,..,31 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    up_leng
    Step(UP) distance is set.
    upsp
    Step(UP) power is set.
    upsp[0] : Step power 1
    upsp[1] : Step power 2
    :
    upsp[8] : Step power 9
    upsp[9] : Step power 10
    dw_leng
    Step(DOWN) distance is set.
    dwsp
    Step(DOWN) power is set.
    dwsp[0] : Step power 1
    dwsp[1] : Step power 2
    :
    dwsp[8] : Step power 9
    dwsp[9] : Step power10
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The cutting condition setting function, the slope control function and the extended driver/library function are necessary.

    laser\cnc_rdpwofsthis

    Reads the history data of the power compensation coefficient.

    When you acquire data before and after updating the history data, there might not be continuousness in the acquired data. So, usually acquire all data from the top.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpwofsthis(unsigned short FlibHndl, long s_no, long *number, ODBPWOFST *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the reading start number of power compensation coefficient. (0,1,2,...)

    number in/out

    Specify the pointer to the variable where the number of history data of power compensation coefficient which wants to be acquired was setted.
    This function returns the number of data which was read actually.
    The maximum number of history data is 30.

    data out

    Specify the pointer to the array of ODBPWOFST structure to store the history data of the power compensation coefficient. The number of array must be equal to "number".
    The ODBPWOFST structure is as follows.

    typedef struct odbpwofst {
        long             pwratio;        /* Power compensation coefficient */
        long             rfvolt;         /* RF voltage */
        unsigned short   year;           /* year */
        unsigned short   month;          /* month */
        unsigned short   day;            /* day */
        unsigned short   hour;           /* hour */
        unsigned short   minute;         /* minute */
        unsigned short   second;         /* second */
    } ODBPWOFST;
    
    pwratio
    Power compensation coefficient (0-9999)
    rfvolt
    RF voltege (0-9999)
    year
    Year (4 digits at Christian era)
    * When the history data is empty, "0" is set in the year data.
    month
    month (1-12)
    day
    day (1-31)
    hour
    hour (0-23)
    minute
    minute (0-59)
    second
    second (0-59)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlagslt

    Writes the assist gas selection of laser setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlagslt(unsigned short FlibHndl, IODBLAGSL *agslt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    agslt in

    Pointer to the IODBLAGSL structure including the assist gas selection of laser setting data. The IODBLAGSL structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodblagsl {
        short   slct;       /* Flag of data selection */
        short   ag_slt;     /* Assist gas selection */
        short   agflow_slt; /* Assist gas flow selection */
        short   reserve[6]; /* (reserve) */
    } IODBLAGSL ;
    ・Series 30i/31i-LB
    typedef struct iodblagsl {
        short   slct;       /* FFlag of data selection           */
        short   ag_slt;     /* Assist gas selection              */
        short   agflow_slt; /* Series 30i/31i-LB cannot be used. */
        short   ag_press;   /* Assist gas pressure               */
        short   ag_ready_t; /* Gas setting time                  */
        short   reserve[4]; /* (reserve)                         */
    } IODBLAGSL ;
    
    slct
    Specify flag of data selection.
    ・Series 16i/18i-L
    bit 0 : Assist gas selection
    bit 1 : Assist gas flow selection
    bit 2,..,7 : (reserve)
    bit 8,..,15 : (not used)
    ・Series 30i/31i-LB
    bit0 : Assist gas selection
    bit1 : Series 30i/31i-LB cannot be used.
    bit2 : Assist gas pressure
    bit3 : Gas setting time
    bit 4,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    ag_slt
    Specify assist gas selection.
    agflow_slt
    Series 16i/18i-L
    Specify assist gas flow selection.
    Series 30i/31i-LB
    Series 30i/31i-LB cannot be used.
    ag_press
    ・Series 30i/31i-LB only
    Specify Assist gas pressure.
    It corresponds to parameter No.15136.
    ag_ready_t
    ・Series 30i/31i-LB only
    Specify Gas setting time.
    It corresponds to parameter No.15135.
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_DATA Data error
    The assist gas selection of laser setting data is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.

    ・Series 16i/18i-L

    1 : Error of assist gas selection
    2 : Error of assist gas flow selection

    ・Series 30i/31i-LB

    1 Error of assist gas selection
    2 Error of select(Selecting items that cannot be used)
    3 Error of Assist gas pressure
    4 Error of Gas setting time
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlagst

    Writes the assist gas flow of laser setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlagst(unsigned short FlibHndl, IODBLAGST *agst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    agst in

    Pointer to the IODBLAGST structure including the assist gas flow of laser setting data. The IODBLAGST structure is as follows.

    typedef struct iodblagst {
        struct {
            short   slct;       /* Flag of data selection */
            short   pre_time;   /* Time for previous step */
            short   pre_press;  /* Pressure in previous step */
            short   proc_press; /* Machining pressure */
            short   end_time;   /* Time for subsequent step */
            short   end_press;  /* Pressure in subsequent step */
            short   reserve[3]; /* (reserve) */
        } gasflow[3] ;
    } IODBLAGST ;
    
    agst.gasflow[0] : Assist gas flow 1
    agst.gasflow[1] : Assist gas flow 2
    agst.gasflow[2] : Assist gas flow 3
    slct
    Specify flag of data selection.
    bit 0 : Time for previous step
    bit 1 : Pressure in previous step
    bit 2 : Machining pressure
    bit 3 : Time for subsequent step
    bit 4 : Pressure in subsequent step
    bit 5,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    pre_time
    Specify time for previous step.
    pre_press
    Specify pressure in previous step.
    proc_press
    Specify machining pressure.
    end_time
    Specify time for subsequent step.
    end_press
    Specify pressure in subsequent step.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_DATA Data error
    The assist gas flow of laser setting data is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    1 : Error of time for previous step
    2 : Error of pressure in previous step
    3 : Error of machining pressure
    4 : Error of time for subsequent step
    5 : Error of pressure in subsequent step
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_wrldsplc

    Writes the command data of reference displace.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrldsplc(unsigned short FlibHndl, short dsplc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsplc in

    Specify the command data of reference displace.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_DATA Data error
    The command data of reference displace(dsplc) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_wrldsplc2

    Writes the standard displacement.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrldsplc2(unsigned short FlibHndl, IODBDSPLC *dsplc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dsplc in

    A pointer to the iodbdsplc structure in which to specify the standard displacement. The IODBDSPLC structure is as follows.

    typedef struct iodbdsplc {
        short   slct;       /* Flag of data selection */
        long    dsplc;      /* Standard displacement  */
        short   dsplc_dec;  /* Decimals places        */
        char    reserve;    /* (reserve)              */
        short   reserves[4];/* (reserve)              */
    } IODBDSPLC ;
    
    slct
    Flag of data selection must be set.
    bit 0 Standard displacement
    bit1,..,15 (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    dsplc
    Specifies the standard displacement.
    (Setting range:parameter No. 15531 to No. 15532 ,Unit:mm、inch
    dsplc_dec
    Specifies the number of decimals places at dsplc (the standard displacement).
    (Setting range:0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      dsplc_dec dsplc
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_DATA Data error
    Error of standard displacement.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrledgprc

    Writes the laser power for contouring.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrledgprc(unsigned short FlibHndl, IODBLEGPR *edgepr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    edgepr in

    Pointer to the IODBLEGPR structure including the laser power for contouring. The IODBLEGPR structure is as follows.

    typedef struct iodblegpr {
        short   slct;       /* Flag of data selection */
        short   power;      /* Peak power */
        short   freq;       /* Pulse frequency */
        short   duty;       /* Pulse duty */
        short   reserve[5]; /* (reserve) */
    } IODBLEGPR ;
    
    slct
    Specify flag of data selection.
    bit 0 : Peak power
    bit 1 : Pulse frequency
    bit 2 : Pulse duty
    bit 3,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    power
    Specify peak power.
    freq
    Specify pulse frequency.
    duty
    Specify pulse duty.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_DATA Data error
    The laser power for contouring is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerrfunction. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : Error of peak power
    2 : Error of pulse frequency
    3 : Error of pulse duty
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlppfbdt

    Writes the data which the function of actual output estimation type pulse power feedback use.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlppfbdt(unsigned short FlibHndl, IDBLPPFBFG *wflag, short *number, IODBLPPFBDT *lppfbdt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    wflag in

    Specifies a pointer to the structure in which to specify the kind and range of data to write. Sets the beginning / finish number which write, when you specify the command value of pulse frequency, the command value of duty cycle, and the actual power.

    typedef struct idblppfbfg {
        short   s_no;           /* The group number of data to write.                 */
        short   slct;           /* The kind of data to write.                         */
        short   s_freq;         /* The pulse frequency number which begins to write.  */
        short   e_freq;         /* The pulse frequency number which finishes to write.*/
        short   s_duty;         /* The duty cycle number which begins to write.       */
        short   e_duty;         /* The duty cycle number which finishes to write.     */
    } IDBLPPFBFG ;
    

    s_no
    Specifies the group number of command data at peak power to write.
    [Setting range] 0 to 7
    slct
    Specifies the kind of data to write.
    A flag of valid data is set.
    The meaning which correspond to each bit of this flag is as follows.
    When you enter each data, set the bit which correspond to data to 1.
    Please set 0 for bit4-15 which is unused.
    bit 0 The command value of peak power
    bit 1 The command value of pulse frequency
    bit 2 The command value of duty cycle
    bit 3 The actual power
    bit 4,..,15 Unused.
    s_freq
    Specifies the pulse frequency number which begins to write.
    When s_freq is -1, all the data of pulse frequency can be write.
    [Setting range] -1, 0 to 9
    e_freq
    Specifies the pulse frequency number which finishes to write.
    When s_freq is -1, e_freq is invalid.(e_freq can be used, when s_freq is 0 to 9)
    [Setting range] 0 to 9
    s_duty
    Specifies the duty cycle number which begins to write.
    When s_duty is -1, all the data of duty cycle can be write.
    [Setting range] -1, 0 to 9
    e_duty
    Specifies the duty cycle number which finishes to write.
    When s_duty is -1, e_duty is invalid.(e_duty can be used, when s_duty is 0 to 9)
    [Setting range] 0 to 9
    The data within the range specified for actual output estimation type pulse power feedback by s_freq, e_freq, s_duty, and e_duty is write.

    number in/out

    Specifies a pointer to the group number of data of actual output estimation type pulse power feedback to write. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set. (specify 1 to 8 for the number)

    lppfbdt in

    A pointer to the IODBLPPFBDT structure in which to specify group data of actual output estimation type pulse power feedback to write.

    The data of this structure prepare the number specified by "number".

    The IODBLPPFBDT structure is as follows.

    typedef struct iodblppfbdt {
        short   ppower;         /* The peak power.     */
        short   dummy;          /* The dummy variable. */
        short   freq[10];       /* The pulse frequency */
        short   duty[10];       /* The duty cycle      */
        short   rpower[10][10]; /* The actual power.   */
    } IODBLPPFBDT ;
    

    ppower
    Specifies the command value of peak power.
    [Unit] W
    [Setting range] 0 to 9999
    dummy
    The dummy variable.
    freq[10]
    Specifies the command value of pulse frequency.
    [Unit] Hz
    [Setting range] 1 to 32767
    When rflag.s_duty is 2 and rflag.e_duty is 4, the value is set from duty[2] to duty[4].
    duty[10]
    Specifies the command value of duty cycle.
    [Unit] %
    [Setting range] 0 to 100
    When rflag.s_duty is 2 and rflag.e_duty is 4, the value is set from duty[2] to duty[4].
    rpower[10][10]
    Specifies the actual power.
    [Unit] W
    [Setting range] -32768 to 32767
    [ i ][ j ] i : The number of duty cycle. , j : The number of pulse frequency.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 Error in the group number of data (s_no) to read.
    2 Error in the kind of data (slct) to read.
    3 Error in the pulse frequency number which begins (s_freq) to read.
    4 Error in the pulse frequency number which finishes (e_freq) to read.
    5 Error in the duty cycle number which begins (s_duty) to read.
    6 Error in the duty cycle number which finishes (e_duty) to read.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 Error in the command value of peak power(ppower)
    2 Error in the command value of pulse frequency(freq[10])
    3 Error in the command value of duty cycle(duty[10])
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030) The actual output estimation type pulse power feedback function is invalid.(Parameter PFB(No.29000#0) mistake)

    laser\cnc_wrlprcprc

    Writes the laser power for piercing.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlprcprc(unsigned short FlibHndl, IODBLPCPR *pierpr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pierpr in

    Pointer to the IODBLPCPR structure including the laser power for piercing. The IODBLPCPR structure is as follows.

    typedef struct iodblpcpr {
        short   slct;       /* Flag of data selection */
        short   power;      /* Piercing initial peak power */
        short   freq;       /* Piercing initial pulse frequency */
        short   duty;       /* Piercing initial pulse duty */
        long    tsime;      /* Piercing time */
        short   reserve[4]; /* (reserve) */
    } IODBLPCPR ;
    
    slct
    Specify flag of data selection.
    bit 0 : Piercing initial peak power
    bit 1 : Piercing initial pulse frequency
    bit 2 : Piercing initial pulse duty
    bit 3 : Piercing time
    bit 4,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    power
    Specify piercing initial peak power.
    freq
    Specify piercing initial pulse frequency.
    duty
    Specify piercing initial pulse duty.
    time
    Specify piercing time.
    reserve
    (reserve)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_DATA Data error
    The laser power for piercing is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : Error of piercing initial peak power
    2 : Error of piercing initial pulse frequency
    3 : Error of piercing initial pulse duty
    4 : Error of piercing time
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlpscdpwrctl

    Writes the Power control data .


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlpscdpwrctl(unsigned short FlibHndl,short s_no, short *number, IODBPWRCTL *pwrctl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specifies the data group number to write.

    901 to 910 power control data group number

    number in/out

    Specifies a pointer to the number of data items in power control. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set.

    pwrctl in

    A pointer to the IODBPWRCTL structure in which to specify the cutting conditions file (the power control data) to write.

    The IODBPWRCTL structure is as follows.

    typedef struct iodbpwrctl {
        short    slct;          /* Flag of data selection                   */
        short    power_min;     /* Minimum peak power                       */
        short    pwr_sp_zr;     /* Peak power at feed rate = 0              */
        short    freq_min;      /* Minimum pulse frequency                  */
        short    freq_sp_zr;    /* Frequency at feed rate = 0               */
        short    duty_min;      /* Minimum pulse duty                       */
        short    duty_sp_zr;    /* Pulse duty at feed rate = 0              */
        char     feed_r_dec;    /* Decimals places                          */
        char     reserve;       /* (reserve)                                */
        long     feed_r;        /* Allowable width of feed rate fluctuation */
        short    reserves[7];   /* (reserve)                                */
    } IODBPWRCTL ;
    
    slct
    Flag of data selection must be set.
    bit 0 Minimum peak power
    bit 1 Peak power at feed rate = 0
    bit 2 Minimum pulse frequency
    bit 3 Frequency at feed rate = 0
    bit 4 Minimum pulse duty
    bit 5 Pulse duty at feed rate = 0
    bit 6 Allowable width of feed rate fluctuation
    bit 7,..,15 リザーブ
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    * Please set 0 for bit7-15 which is unused.
    power_min
    Specifies the minimum peak power (clamp value).
    (Setting range:0 to 9999,Unit of data:W)
    pwr_sp_zr
    Specifies the peak power at feed rate = 0.
    (Setting range:0 to 9999,Unit of data:W)
    freq_min
    Specifies the minimum pulse frequency.
    (Setting range:1 to 32767,Unit of data:Hz)
    freq_sp_zr
    Specifies the pulse frequency at feed rate = 0.
    (Setting range:1 to 32767,Unit of data:Hz)
    duty_min
    Specifies the minimum pulse duty.
    (Setting range:0 to 100,Unit of data:%)
    duty_sp_zr
    Specifies the pulse duty at feed rate = 0.
    (Setting range:0 to 100,Unit of data:%)
    feed_r_dec
    Specifies the number of decimals places at allowable width of feed rate fluctuation.
    (Setting range:0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      feed_r_dec feed_r
    reserve
    (reserve)
    feed_r
    Specifies the allowable width of feed rate fluctuation.
    (Setting range:0 to 999999999,Unit of data:mm、inch(input unit))
    reserves
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The power control data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 Error of Minimum peak power
    2 Error of Peak power at feed rate = 0
    3 Error of Minimum pulse frequency
    4 Error of Frequency at feed rate = 0
    5 Error of Minimum pulse duty
    6 Error of Pulse duty at feed rate = 0
    7 Error of Allowable width of feed rate fluctuation
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlpwrcpst

    Writes the power compensation coefficient.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlpwrcpst(unsigned short FlibHndl, short pwrcpst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrcpst in

    Specify the power compensation coefficient.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_DATA Data error
    The power compensation coefficient(pwrcpst) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    laser\cnc_wrlpwrctrl

    Writes the on/off of laser power control.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlpwrctrl(unsigned short FlibHndl, short pwrctrl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrctrl in Specify the on/off of laser power control.
    0 : Off (unavailable)
    1 : On (available)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlpwrdty

    Writes the duty data for power control.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlpwrdty(unsigned short FlibHndl,IODBLPWDT *pwrdty);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrdty in

    Pointer to the IODBLPWDT structure including the duty data for power control. The IODBLPWDT structure is as follows.

    typedef struct iodblpwdt {
        short   slct;      /* Flag of data selection */
        short   dty_const; /* Constant of duty for power control (Series 30i/31i-LB cannot be used.) */
        short   dty_min;   /* Minimum duty for power control */
        short   reserve[6];/* (reserve) */
    } IODBLPWDT ;
    
    slct
    Flag of data selection must be set.
    bit0 : Constant of duty for power control (Series 30i/31i-LB cannot be used.)
    bit1 : Minimum duty for power control
    bit 2,..,7 : (reserve)
    bit 8,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    dty_const
    Specify constant of duty for power control. (Series 30i/31i-LB cannot be used.)
    dty_min
    Specify minimum duty for power control.
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_DATA Data error
    The duty data for power control is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : Error of constant of duty for power control
    2 : Error of minimum duty for power control
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrlpwrslt

    Writes the number of power devices (the number of effective discharge tubes). Either all tubes or half can be specified.

    After changing the setting, turn off the HV, and turn on it. Then the number of effective discharge tubes is changed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrlpwrslt(unsigned short FlibHndl, short pwrslt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pwrslt in Specify the number of power devices (the number of effective discharge tubes).
    0 : All tubes are used.
    1 : Half of the tubes are used.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrmngtime

    Writes the management time data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmngtime(unsigned short FlibHndl, long no, IODBMNGTIME *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    no in

    Specify the setting number of management time data. (0,1,2,...)

    data in

    Specify the pointer to IODBMNGTIME structure which stored the management time data.
    The IODBMNGTIME structure is as follows.

    typedef struct iodbmngtime {
        unsigned long    life;   /* Setted life(setting time) */
        unsigned long    total;  /* Total management time(managemant time) */
    } IODBMNGTIME;
    
    life
    Setted life(setting time) (0〜99999999)
    total
    Total management time(managemant time) (0〜99999999)

    setting unit 1 = 0.1 hour
    * When "0" is set to setted life, the management time is not counted.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    EW_PARAM CNC parameter was wrong.
    Set "1" in the parameter No.15160#1.
    Mistake of laser oscillator (parameter No.15030)(Series 30i/31i-LB only)

    laser\cnc_wrpscdedge

    Writes the edge cutting data of the cutting condition file.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpscdedge(unsigned short FlibHndl,short s_no, short *number, IODBEDGE *edge);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start edge cutting data group number.

    201 to 205 : edge cutting data group number

    number in/out

    Pointer to the number of edge cutting data. Specify the number of edge cutting data to be written before function call, and the number of edge cutting data being written actually is stored after the function call.

    edge in

    Pointer to the IODBEDGE structure including the edge cutting data of the cutting condition file. The IODBEDGE structure is as follows.

    typedef struct iodbedge {
        short   slct;       /* Flag of data selection */
        short   angle;      /* Judge angle for edge */
        short   power;      /* Piercing power */
        short   freq;       /* Piercing frequency */
        short   duty;       /* Piercing duty */
        long    pier_t;     /* Piercing time */
        short   g_press;    /* Piercing gas press */
        short   g_kind;     /* Piercing gas select */
        long    r_len;      /* Recovery distance */
        short   r_feed;     /* Recovery feedrate */
        short   r_freq;     /* Recovery frequency */
        short   r_duty;     /* Recovery duty */
        short   gap;        /* Deflection/gap */
        short   reserve[4]; /* (reserve) */
    } IODBEDGE ;
    
    slct
    Flag of data selection must be set.
    bit 0 : Judge angle for edge
    bit 1 : Piercing power
    bit 2 : Piercing frequency
    bit 3 : Piercing duty
    bit 4 : Piercing time
    bit 5 : Piercing gas press
    bit 6 : Piercing gas select
    bit 7 : Recovery distance
    bit 8 : Recovery feedrate
    bit 9 : Recovery frequency
    bit10 : Recovery duty
    bit11 : Deflection/gap
    bit12,..,15 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    angle
    Specify judge angle for edge.
    (Setting range: 0 to 180, Unit: degree)
    power
    Specify piercing power (peak value).
    (Setting range: 0 to 9999, Unit: W)
    freq
    Specify piercing frequency.
    (Setting range: 5 to 2000, Unit: Hz)
    duty
    Specify piercing duty.
    (Setting range: 0 to 100, Unit: %)
    pier_t
    Specify piercing time.
    (Setting range: 0 to 999999, Unit: 0.001sec.)
    g_press
    Specify piercing gas press(assist gas pressure)
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    g_kind
    Specify piercing gas select(kind of assist gas)
    (Setting range: 1 to 7, Unit: kind)
    r_len
    Specify recovery distance.
    (Setting range: 0 to 99999, Unit: 0.001mm)
    r_feed
    Specify recovery feedrate.
    (Setting range: 0 to 9999, Unit: mm/min)
    r_freq
    Specify recovery frequency.
    (Setting range: 5 to 2000, Unit: Hz)
    r_duty
    Specify recovery duty.
    (Setting range: 0 to 100, Unit: %)
    gap
    Specify deflection/gap.
    (Setting range: -32767 to 32767)
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The edge cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The edge cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 : Error of judge angle for edge
    2 : Error of piercing power
    3 : Error of piercing frequency
    4 : Error of piercing duty
    5 : Error of piercing time
    6 : Error of piercing gas press
    7 : Error of piercing gas select
    8 : Error of recovery distance
    9 : Error of recovery feedrate
    10 : Error of recovery frequency
    11 : Error of recovery duty
    12 : Error of deflection/gap
    EW_NOOPT No option
    The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary.

    laser\cnc_wrpscdedge2

    Writes the edge cutting data in the cutting conditions file.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpscdedge2(unsigned short FlibHndl,short s_no, short *number, IODBEDGE2 *edge2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specifies the data group number to write.

    When addition of the cutting condition data option is not provided.

    201 to 205  edge cutting data group number

    When addition of the cutting condition data option is provided.

    201 to 220  edge cutting data group number

    number in/out

    A pointer to the number of data items in edge cutting is set. Specifies the number to write before calling the function. The number which actually wrote after calling the function is set.

    edge2 in

    A pointer to the iodbedge2 structure in which to specify the cutting conditions file (the edge cutting data) to write. The IODBEDGE2 structure is as follows.

    typedef struct iodbedge2 {
        short    slct;          /* Flag of data selection          */
        short    power;         /* Peak power in piercing          */
        short    freq;          /* Frequency in piercing           */
        short    duty;          /* Duty in piercing                */
        short    g_press;       /* Assist gas pressure in piercing */
        short    g_kind;        /* Assist gas type in piercing     */
        long     pier_t;        /* Time in piercing                */
        long     angle;         /* Edge operation angle            */
        long     gap;           /* Standard displacement           */
        long     r_len;         /* Return distance                 */
        long     r_feed;        /* Return speed                    */
        short    r_freq;        /* Return frequency                */
        short    r_duty;        /* Return pulse duty               */
        char     gap_axis;     /* Gap control axis                */
        char     angle_dec;     /* Ddecimals places                */
        char     gap_dec;       /* Ddecimals places                */
        char     r_len_dec;     /* Ddecimals places                */
        char     r_feed_dec;    /* Ddecimals places                */
        char     reserve;      /* (reserve)                       */
        short    reserves[3];   /* (reserve)                       */
    } IODBEDGE2 ;
    
    slct
    Flag of data selection must be set.
    bit 0 Edge operation angle
    bit 1 Peak power in piercing
    bit 2 Frequency in piercing
    bit 3 Duty in piercing
    bit 4 Time in piercing
    bit 5 Assist gas pressure in piercing
    bit 6 Assist gas type in piercing
    bit 7 Return distance
    bit 8 Return speed
    bit 9 Return frequency
    bit10 Return pulse duty
    bit11 Standard displacement
    bit12,..,15 (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    power
    Specifies the value of peak power in piercing.
    (Setting range:0 to 9999,Unit:W)
    freq
    Specifies the pulse frequency in piercing.
    (Setting range:1 to 32767,Unit:Hz)
    duty
    Specifies the pulse duty in piercing.
    (Setting range:0 to 100,Unit:%)
    g_press
    Specifies the assist gas pressure in piercing.
    (Setting range:0 to 9999,Unit:0.01MPa、0.1Kg/cm2)
    g_kind
    Specifies the assist gas type in piercing.
    (Setting range:0 to 15,Unit:kind)
    pier_t
    Specifies the time in piercing.
    (Setting range:0 to 999999,Unit:0.001sec)
    angle
    Specifies the edge operation angle.
    (Setting range:0 to 999999999,Unit:degree)
    gap
    Specifies the standard displacement.
    (Setting range:-999999999 to 999999999, Unit:mm/min(input unit))
    r_len
    Specifies the return distance.
    (Setting range:-999999999 to 999999999,Unit:mm、inch(input unit))
    r_feed
    Specifies the return speed.
    (Setting range:0 to 999999999,Unit:mm/min, inch/min(input unit))
    r_freq
    Specifies the return frequency.
    (Setting range:1 to 32767,Unit:Hz)
    r_duty
    Specifies the return pulse duty.
    (Setting range:0 to 100,Unit:%)
    gap_axis
    You cannot set the gap control axis even if you specified it.
    angle_dec
    Specifies the number of decimals places at edge operation angle.
    (Setting range:0 to 9)
    gap_dec
    Specifies the number of decimals places at standard displacement.
    (Setting range:0 to 9)
    r_len_dec
    Specifies the number of decimals places at return distance.
    (Setting range:0 to 9)
    r_feed_dec
    Specifies the number of decimals places at return speed.
    (Setting range:0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      angle_dec angle
      gap_dec gap
      r_len_dec r_len
      r_feed_dec r_feed
    reserve
    (reserve)
    reserves
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The edge cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 Error of Edge operation angle
    2 Error of Peak power in piercing
    3 Error of Frequency in piercing
    4 Error of Duty in piercing
    5 Error of Time in piercing
    6 Error of Assist gas pressure in piercing
    7 Error of Assist gas type in piercing
    8 Error of Return distance
    9 Error of Return speed
    10 Error of Return frequency
    11 Error of Return pulse duty
    12 Error of Standard displacement
    EW_NOOPT No option
    The cutting condition setting function, the edge cutting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrpscdpirc

    Writes the piercing data of the cutting condition file.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpscdpirc(unsigned short FlibHndl,short s_no, short *number, IODBPIRC *pircing);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start piercing data group number.

    ・Series 16i/18i-L

    101 to 103 : piercing data group number

    ・Series 30i/31i-LB

    When addition of the cutting condition data option is not provided.

    101 to 103 piercing data group number

    When addition of the cutting condition data option is provided.

    101 to 110 piercing data group number

    number in/out

    Pointer to the number of piercing data. Specify the number of piercing data to be written before function call, and the number of piercing data being written actually is stored after the function call.

    pircing in

    Pointer to the IODBPIRC structure including the piercing data of the cutting condition file. The IODBPIRC structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodbpirc {
        short   slct;       /* Flag of data selection */
        short   power;      /* Peak power */
        short   freq;       /* Initial frequency */
        short   duty;       /* Initial duty */
        short   i_freq;     /* Step frequency */
        short   i_duty;     /* Step duty */
        short   step_t;     /* Step time */
        short   step_sum;   /* Step number */
        long    pier_t;     /* Piercing time */
        short   g_press;    /* Assist gas pressure */
        short   g_kind;     /* Assist gas select */
        short   g_time;     /* Assist gas setting time */
        short   def_pos;    /* Reference displace */
        short   reserve[4]; /* (reserve) */
    } IODBPIRC ;
    ・Series 30i/31i-LB
    typedef struct iodbpirc {
        short   slct;        /* Flag of data selection  */
        short   power;       /* Peak power              */
        short   freq;        /* Initial frequency       */
        short   duty;        /* Initial duty            */
        short   i_freq;      /* Step frequency          */
        short   i_duty;      /* Step duty               */
        short   step_t;      /* Step time               */
        short   step_sum;    /* Step number             */
        long    pier_t;      /* Piercing time           */
        short   g_press;     /* Assist gas pressure     */
        short   g_kind;      /* Assist gas select       */
        short   g_time;      /* Assist gas setting time */
        short   def_pos;     /* Reference displace      */
        long    def_pos2;    /* Reference displace 2    */
        char    gap_axis;    /* Gap control axis        */
        char    def_pos2_dec;/* Decimals places         */
        short   reserve;     /* (reserve)               */
    } IODBPIRC ;
    
    slct
    Flag of data selection must be set.
    ・Series 16i/18i-L
    bit 0 : Peak power
    bit 1 : Initial frequency
    bit 2 : Initial duty
    bit 3 : Step frequency
    bit 4 : Step duty
    bit 5 : Step time
    bit 6 : Step number
    bit 7 : Piercing time
    bit 8 : Assist gas pressure
    bit 9 : Assist gas select
    bit10 : Assist gas setting time
    bit11 : Reference displace
    bit12,..,15 : (reserve)
    ・Series 30i/31i-LB
    bit 0 : Peak power
    bit 1 : Initial frequency
    bit 2 : Initial duty
    bit 3 : Step frequency
    bit 4 : Step duty
    bit 5 : Step time
    bit 6 : Step number
    bit 7 : Piercing time
    bit 8 : Assist gas pressure
    bit 9 : Assist gas select
    bit10 : Assist gas setting time
    bit11 : Reference displace
    bit12 : Reference displace 2
    bit13 : Gap control axis
    bit14,..,15 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    power
    Specify peak power.
    (Setting range: 0 to 9999, Unit: W)
    freq
    Specify initial frequency.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 1 to 3276, Unit: Hz)
    duty
    Specify initial duty.
    (Setting range: 0 to 100, Unit: %)
    i_freq
    Specify step frequency.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 0 to 32767, Unit: Hz)
    i_duty
    Specify step duty.
    (Setting range: 0 to 99, Unit: %)
    step_t
    Specify step time.
    (Setting range: 0 to 9999, Unit: 0.001second)
    step_sum
    Specify step number.
    (Setting range: 0 to 99, Unit: time)
    pier_t
    Specify piercing time.
    (Setting range: 1 to 999999, Unit: 0.001sec.)
    g_press
    Specify assist gas pressure.
    ・Series 16i/18i-L
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    ・Series 30i/31i-LB
    (Setting range: 0 to 9999, Unit: 0.01MPa, 0.1Kg/cm2)
    g_kind
    Specify assist gas select.
    ・Series 16i/18i-L
    (Setting range: 1 to 7, Unit: kind)
    ・Series 30i/31i-LB
    (Setting range: 1 to 15, Unit: kind)
    g_time
    Specify assist gas setting time.
    (Setting range: 0 to 99, Unit: 0.1second)
    def_pos
    Specify reference displace.
    (Setting range: -32767 to 32767, Unit: 0.001mm)
    def_pos2
    ・Series 30i/31i-LB only
    Specify Reference displace 2.
    (Setting range: -999999999 to 999999999, Unit: mm, inch(input unit))
    gap_axis
    ・Series 30i/31i-LB only
    You cannot set the gap control axis even if you specified it.
    def_pos2_dec
    ・Series 30i/31i-LB only
    Specify decimals places in Reference displace 2.
    (Setting range: 0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      def_pos2_dec def_pos2
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L, 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The piercing data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The piercing data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 : Error of peak power
    2 : Error of initial frequency
    3 : Error of initial duty
    4 : Error of step frequency
    5 : Error of step duty
    6 : Error of step time
    7 : Error of step number
    8 : Error of piercing time
    9 : Error of assist gas pressure
    10 : Error of assist gas select
    11 : Error of assist gas setting time
    12 : Error of reference displace
    13 Error of reference displace 2(Series 30i/31i-LB only)
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrpscdproc

    Writes the cutting data of the cutting condition file.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpscdproc(unsigned short FlibHndl,short s_no, short *number, IODBPSCD *pscd);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start cutting data group number.

    ・Series 16i/18i-L

    1 to 10 : cutting data group number

    ・Series 30i/31i-LB

    When addition of the cutting condition data option is not provided.

    1 to 10 cutting data group number

    When addition of the cutting condition data option is provided.

    1 to 30 cutting data group number

    number in/out

    Pointer to the number of cutting data. Specify the number of cutting data to be written before function call, and the number of cutting data being written actually is stored after the function call.

    pscd in

    Pointer to the IODBPSCD structure including the cutting data of the cutting condition file. The IODBPSCD structure is as follows.

    ・Series 16i/18i-L
    typedef struct iodbpscd {
        short   slct;       /* Flag of data selection */
        long    feed;       /* Feedrate */
        short   power;      /* Cutting peak power */
        short   freq;       /* Cutting frequency */
        short   duty;       /* Cutting duty */
        short   g_press;    /* Assist gas pressure */
        short   g_kind;     /* Assist gas select */
        short   g_ready_t;  /* Assist gas setting time */
        short   displace;   /* Reference displace */
        long    supple;     /* Beam radius offset */
        short   edge_slt;   /* Edge cutting select */
        short   appr_slt;   /* Start-up select */
        short   pwr_ctrl;   /* Power control */
        short   reserve[4]; /* (reserve) */
    } IODBPSCD ;
    ・Series 30i/31i-LB
    typedef struct iodbpscd {
        short   slct;       /* Flag of data selection   */
        long    feed;       /* Feedrate                 */
        short   power;      /* Cutting peak power       */
        short   freq;       /* Cutting frequency        */
        short   duty;       /* Cutting duty             */
        short   g_press;    /* Assist gas pressure      */
        short   g_kind;     /* Assist gas select        */
        short   g_ready_t;  /* Gas setting time         */
        short   displace;   /* Reference displace       */
        long    supple;     /* Beam radius offset       */
        short   edge_slt;   /* Edge cutting select      */
        short   appr_slt;   /* Start-up select          */
        short   pwr_ctrl;   /* Power control            */
        long    displace2;  /* Reference displace       */
        char    gap_axis;   /* Gap control axis         */
        char    feed_dec;   /* Decimals places          */
        char    supple_dec; /* Decimals places          */
        char    dsp2_dec;   /* Decimals places          */
    } IODBPSCD ;
    
    slct
    Flag of data selection must be set.
    ・Series 16i/18i-L
    bit 0 : Feedrate
    bit 1 : Cutting peak power
    bit 2 : Cutting frequency
    bit 3 : Cutting duty
    bit 4 : Assist gas pressure
    bit 5 : Assist gas select
    bit 6 : Assist gas setting time
    bit 7 : Reference displace
    bit 8 : Beam radius offset
    bit 9 : Edge cutting select
    bit10 : Start-up select
    bit11 : Power control
    bit12,..,15 : (reserve)
    ・Series 30i/31i-LB
    bit 0 Feedrate
    bit 1 Cutting peak power
    bit 2 Cutting frequency
    bit 3 Cutting duty
    bit 4 Assist gas pressure
    bit 5 Assist gas select
    bit 6 Gas setting time
    bit 7 Reference displace
    bit 8 Beam radius offset
    bit 9 Edge cutting select
    bit10 Start-up select
    bit11 Power control
    bit12 Reference displace2
    bit13 Gap control axis
    bit14,..,15 (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    feed
    Specify feedrate.
    ・Series 16i/18i-L
    (Setting range: 0 to 240000, Unit: mm/min)
    ・Series 30i/31i-LB
    (Setting range: 0 to 999999999, Unit:mm/min, inch/min((input unit)))
    power
    Specify cutting peak power for contouring.
    (Setting range: 0 to 9999, Unit: W)
    freq
    Specify cutting frequency for contouring.
    ・Series 16i/18i-L
    (Setting range: 5 to 2000, Unit: Hz)
    ・Series 30i/31i-LB
    (Setting range: 1 to 32767, Unit:Hz)
    duty
    Specify cutting duty for contouring.
    (Setting range: 0 to 100, Unit: %)
    g_press
    Specify assist gas pressure.
    ・Series 16i/18i-L
    (Setting range: 0 to 255, Unit: 0.1Kg/cm2)
    ・Series 30i/31i-LB
    (Setting range: 0 to 9999, Unit: 0.01MPa, 0.1Kg/cm2)
    g_kind
    Specify assist gas select.
    ・Series 16i/18i-L
    (Setting range: 1 to 7, Unit: kind)
    ・Series 30i/31i-LB
    (Setting range: 1 to 15, Unit: kind)
    g_ready_t
    Specify assist gas setting time.
    (Setting range: 0 to 99, Unit: 0.1second)
    displace
    Specify reference displace.
    (Setting range: -32767 to 32767, Unit: 0.001mm)
    supple
    Specify beam radius offset.
    ・Series 16i/18i-L
    (Setting range: -9999 to 9999, Unit: 0.001mm)
    ・Series 30i/31i-LB
    (Setting range: -999999999 to 999999999, Unit: mm, inch(input unit))
    edge_slt
    Specify edge cutting select.
    ・Series 16i/18i-L
    (Setting range: 0, 201 to 205)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Setting range: 0, 201 to 205)
    When addition of the cutting condition data option is provided.
    (Setting range: 0, 201 to 210)
    appr_slt
    Specify start-up select.
    ・Series 16i/18i-L
    (Setting range: 0, 201 to 205)
    ・Series 30i/31i-LB
    When addition of the cutting condition data option is not provided.
    (Setting range: 0, 201 to 205)
    When addition of the cutting condition data option is provided.
    (Setting range: 0, 201 to 210)
    pwr_ctrl
    Specify power control.
    (Setting range: 0, 901 to 910)
    displace2
    ・Series 30i/31i-LB only
    Specify Reference displace 2 .
    (Setting range: -999999999 to 999999999, Unit: mm, inch(input unit))
    gap_axis
    ・Series 30i/31i-LB only
    You cannot set the gap control axis even if you specified it.
    feed_dec
    ・Series 30i/31i-LB only
    Specify decimals places in command value of feed rate.
    (Setting range: 0 to 9)
    supple_dec
    ・Series 30i/31i-LB only
    Specify decimals places of beam diameter correction amount.
    (Setting range: 0 to 9)
    dsp2_dec
    ・Series 30i/31i-LB only
    Specify decimals places in standard displacement.
    (Setting range: 0 to 9)
    The corresponding data is as follows.
      decimals places corresponding data
      feed_dec feed
      supple_dec supple
      dsp2_dec displace2
    reserve
    ・Series 16i/18i-L only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L , 30i/31i-LB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The cutting data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The cutting data group number which an error occurred will be set onto the member of err_no of ODBERR structure and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 : Error of feedrate
    2 : Error of cutting peak power
    3 : Error of cutting frequency
    4 : Error of cutting duty
    5 : Error of assist gas pressure
    6 : Error of assist gas select
    7 : Error of assist gas setting time
    8 : Error of reference displace
    9 : Error of beam radius offset
    10 : Error of edge cutting select
    11 : Error of start-up select
    12 : Error of power control
    13 Error of reference displace 2(Series 30i/31i-LB only)
    EW_NOOPT No option
    The cutting condition setting function and the extended driver/library function are necessary.
    EW_PARAM CNC parameter error(Series 30i/31i-LB only)
    Mistake of laser oscillator (parameter No.15030)

    laser\cnc_wrpscdslop

    Writes the slope control data of the cutting condition file.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpscdslop(unsigned short FlibHndl,short s_no, short *number, IODBSLOP *slope);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start slope control data group number.

    301 to 305 : slope control data group number(UP/DOWN)

    number in/out

    Pointer to the number of slope control data. Specify the number of slope control data to be written before function call, and the number of slope control data being written actually is stored after the function call.

    slope out

    Pointer to the IODBSLOP structure including the slope control data of the cutting condition file. The IODBSLOP structure is as follows.

    typedef struct iodbslop {
        long    slct;       /* Flag of data selection */
        long    upleng;     /* Step(UP) distance */
        short   upsp[10];   /* Step(UP) power 1 to 10 */
        long    dwleng;     /* Step(DOWN) distance */
        short   dwsp[10];   /* Step(DOWN) power 1 to 10 */
        short   reserve[10];/* (reserve) */
    } IODBSLOP ;
    
    slct
    Flag of data selection must be set.
    bit 0 : Step(UP) distance
    bit 1 : Step(UP) power 1
    bit 2 : Step(UP) power 2
    bit 3 : Step(UP) power 3
    bit 4 : Step(UP) power 4
    bit 5 : Step(UP) power 5
    bit 6 : Step(UP) power 6
    bit 7 : Step(UP) power 7
    bit 8 : Step(UP) power 8
    bit 9 : Step(UP) power 9
    bit10 : Step(UP) power 10
    bit11 : Step(DOWN) distance
    bit12 : Step(DOWN) power 1
    bit13 : Step(DOWN) power 2
    bit14 : Step(DOWN) power 3
    bit15 : Step(DOWN) power 4
    bit16 : Step(DOWN) power 5
    bit17 : Step(DOWN) power 6
    bit18 : Step(DOWN) power 7
    bit19 : Step(DOWN) power 8
    bit20 : Step(DOWN) power 9
    bit21 : Step(DOWN) power 10
    bit22,..,31 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    up_leng
    Specify step(UP) distance.
    upsp
    Specify step(UP) power is set.
    upsp[0] : Step power 1
    upsp[1] : Step power 2
    :
    upsp[8] : Step power 9
    upsp[9] : Step power 10
    dw_leng
    Specify step(DOWN) distance is set.
    dwsp
    Specify step(DOWN) power is set.
    dwsp[0] : Step power 1
    dwsp[1] : Step power 2
    :
    dwsp[8] : Step power 9
    dwsp[9] : Step power 10
    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 16i/18i-L.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The slope control data of the cutting condition file is wrong. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The slope control data group number which an error occurred will be set onto the member of err_no of ODBERR structure, and the following detailed status will be set onto the member of err_dtno of ODBERR structure.
    1 : Error of step(UP) distance
    2 : Error of step(UP) power 1
    3 : Error of step(UP) power 2
    4 : Error of step(UP) power 3
    5 : Error of step(UP) power 4
    6 : Error of step(UP) power 5
    7 : Error of step(UP) power 6
    8 : Error of step(UP) power 7
    9 : Error of step(UP) power 8
    10 : Error of step(UP) power 9
    11 : Error of step(UP) power 10
    12 : Error of step(DOWN) distance
    13 : Error of step(DOWN) power 1
    14 : Error of step(DOWN) power 2
    15 : Error of step(DOWN) power 3
    16 : Error of step(DOWN) power 4
    17 : Error of step(DOWN) power 5
    18 : Error of step(DOWN) power 6
    19 : Error of step(DOWN) power 7
    20 : Error of step(DOWN) power 8
    21 : Error of step(DOWN) power 9
    22 : Error of step(DOWN) power 10
    EW_NOOPT No option
    The cutting condition setting function, the slope control function and the extended driver/library function are necessary.

    misc\cnc_adcnv

    Reads the A/D conversion data. The A/D conversion data is stored in "data" of "ODBAD".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_adcnv(unsigned short FlibHndl, short inp_type, short av_type, ODBAD *adcnv);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    inp_type in

    Specify the type of analog voltage input.

  • Series 15/15i
  • 0, 1 : Analog for general purpose
    100, 101 : Load current of analog spindle
    200 : Load current of CNC controlled axis

  • Series 16/18, 16i/18i, 0i, 30i, Power Mate i, PMi-A
  • 0 : Analog for general purpose(4 channel) -- only 16/18 MODEL B/C
    2 : CNC controlled axis load current

    av_type in

    Specify the kind of analog voltage(specification of connector).

  • Series 15/15i
    1. Specification of analog for general purpose
    2. inp_type av_type Input channel Signal Connector
      0 0 Channel1 AIN2 JA6
      1 0 Channel2 AIN3 JA6

    3. Specification of load current of analog spindle.
    4. inp_type av_type Analog spindle Signal Connector
      100 0 1st spindle AIN0 JA6
      101 0 2nd spindle AIN1 JA6

    5. Specification of Load current of CNC controlled axis.
    6. inp_type av_type Servo axis Signal Connector
      200 1 1st axis AMP1 JV1
      200 2 2nd axis AMP2 JV2
         :
      200 10 10th axis AMP10 JV10
      200 11 11th axis AMP11 JV11
         :
      200 23 23th axis AMP23 JV23
      200 24 24th axis AMP24 JV24
      • When MAX_AXIS=15, av_type=16,..,24 are not used.
      • When MAX_AXIS=10, av_type=11,..,24 are not used.

  • Series 16/18, 16i/18i, 30i 0i, Power Mate i, PMi-A
    1. Specification of analog for general purpose(16/18 MODEL B/C)
    2. inp_type av_type Servo axis Signal Connector
      0 0 Channel1 AIN0 JA6
      0 1 Channel2 AIN1 JA6
      0 2 Channel3 AIN2 JA6
      0 3 Channel4 AIN3 JA6

    3. Specification of Load current of CNC controlled axis.
    4. inp_type av_type Servo axis Signal Connector
      2 1 1st axis AMP1 JV1
      2 2 2nd axis AMP2 JV2
      2 3 3rd axis AMP3 JV3
      2 4 4th axis AMP4 JV4
      2 5 5th axis AMP5 JV5
      2 6 6th axis AMP6 JV6
      2 7 7th axis AMP7 JV7
      2 8 8th axis AMP8 JV8
         :
      2 31 31th axis AMP31 JV31
      2 32 32th axis AMP32 JV32
      • 9axis-32axis are effective for Series 30i.
    adcnv out

    Pointer to the ODBAD structure including A/D conversion data. The ODBAD structure is as follows.

                            
  • Series 15B
  • typedef struct odbad { short datano ; /* type of analog voltage input */ short type ; /* kind of analog voltage (specification of connector) */ char data ; /* digital voltage */ } ODBAD ;

                            
  • Series 15i, 16/18, 16i/18i/21i, 30i, 0i, Power Mate i, PMi-A
  • typedef struct odbad { short datano ; /* type of analog voltage input */ short type ; /* kind of analog voltage (specification of connector) */ short data ; /* digital voltage */ } ODBAD ;
    datano
    The type of analog voltage input is stored.
    type
    The kind of analog voltage(specification of connector) is stored.
    data
    The analog voltage data is set, which is input in A/D converter of the CNC, with conversion into digital value.
     
  • Series 15/15i
  • The A/D conversion data (0,..,255) which is converted from input voltage data is stored with binary format. The digital data is linearly proportional to the input voltage as follows.
    Input voltage data
    -10V 0
    0V 128 (half - adjust value)
    10V 255

  • Series 16/18, 16i/18i/21i, 30i, 0i, Power Mate i, PMi-A
  • Specification of analog for general purpose(16/18 MODEL B/C)
  • The A/D conversion data (0,..,255) which is converted from input voltage data is stored with binary format. The digital data is linearly proportional to the input voltage as follows.
    Input voltage data
    -10V 0
    0V 128 (half - adjust value)
    10V 255

  • Specification of Load current of CNC controlled axis.
  • The digital value which is converted from the load current is stored with binary format. It is possible to get the load current using this value as following formula.

    The load current (A) = adcnv.data * N / 6554

    N : the value read from Parameter No.2086

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    inp_type in

    Specify the type of analog voltage input.

    2 : CNC controlled axis load current
    av_type in

    Specify the kind of analog voltage(specification of connector).

    inp_type av_type Servo axis Signal Connector
    2 1 1st axis AMP1 JV1
    2 2 2nd axis AMP2 JV2
       :
    2 31 31th axis AMP31 JV31
    2 32 32th axis AMP32 JV32
    adcnv out

    Pointer to the ODBAD structure including A/D conversion data. The ODBAD structure is as follows.

    typedef struct odbad {
         short  datano ;     /* type of analog voltage input */
         short  type ;       /* kind of analog voltage
                                    (specification of connector) */
         short  data ;       /* digital voltage */
    } ODBAD ;
    datano
    The type of analog voltage input is stored.
    type
    The kind of analog voltage(specification of connector) is stored.
    data
    The analog voltage data is set, which is input in A/D converter of the CNC, with conversion into digital value.
     
    The digital value which is converted from the load current is stored with binary format. It is possible to get the load current using this value as following formula.

    The load current (A) = adcnv.data * N / 6554

    N : the value read from Parameter No.2086

    (If N is 20 or more, round down the place of one.)


    ERRORS

    Code Description
    EW_NUMBER Data number error
    The type of analog voltage input (inp_type) is wrong.
    EW_ATTRIB Data attribute error
    The kind of analog voltage (av_type) is wrong.

    misc\cnc_alarm

    Reads the alarm status of CNC. Various information is stored in "data" of ODBALM.

    This function is used for watching CNC's alarm status, displaying the maintenance information or guidance of how to reset the alarm, etc.

    When CNC falls into the system alarm, it is completely impossible to communicate data, and the alarm status cannot be acquired.

    Please use the cnc_alarm2 function for Series 15i, 30i, 0i-D/F and PMi-A, because this function cannot read all alarm status of Series 15i, 30i, 0i-D/F and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_alarm(unsigned short FlibHndl, ODBALM *alarm);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alarm out

    Pointer to the ODBALM structure including the alarm status information.

    The ODBALM structure is as follows.
    typedef struct odbalm {
         short  dummy[2] ;          /* Not used. */
         short  data ;              /* Alarm status */
    } ODBALM ;
    
    dummy
    Not used.
    data
    Alarm status
    The meaning of each bit is as follows.
    • Series 15/15i
    • #00 : Background P/S (BG)
      #01 : Foreground P/S (PS)
      #02 : Overheat alarm(only Series 15) (OH)
      #03 : Sub-CPU error(only Series 15) (SB)
      #04 : Syncronized error (SN)
      #05 : Parameter switch on (SW)
      #06 : Overtravel,External data (OT)
      #07 : PMC error (PC)
      #08 : External alarm message (1) (EX)
      #09 : (Not used)
      #10 : Serious P/S (SR)
      #11 : (Not used)
      #12 : Servo alarm (SV)
      #13 : I/O error (IO)
      #14 : Power off parameter set (PW)
      #15 : System alarm(only Series 15i) (SY)
    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • #00 : P/S100
      #01 : P/S000
      #02 : P/S101
      #03 : P/S alarm except above
      #04 : Overtravel alarm
      #05 : Overheat alarm
      #06 : Servo alarm
      #07 : System alarm
      #08 : APC alarm
      #09 : Spindle alarm
      #10 : P/S alarm(No.5000,..), Punchpress alarm
      #11 : Laser alarm
      #12 : (Not used)
      #13 : Rigid tap alarm
      #14 : (Not used)
      #15 : External alarm message
    • Series 16i/18i-W
    • #00 : P/S alarm
      #01 : Overtravel alarm
      #02 : Servo alarm
      #03 : (Not used)
      #04 : Overtravel alarm
      #05 : Stroke limit - 1
      #06 : Stroke limit - 2
      #07 : Edit alarm
      #08 : APC alarm
      #09 : (Not used)
      #10 : P/S 5000 ... alarm
      #11 : (Not used)
      #12 : (Not used)
      #13 : (Not used)
      #14 : External alarm message
      #15 : Reverse control alarm
    • Series 30i, 0i-D/F, PMi-A
    • #00 : Parameter switch on (SW)
      #01 : Power off parameter set (PW)
      #02 : I/O error (IO)
      #03 : Foreground P/S (PS)
      #04 : Overtravel,External data (OT)
      #05 : Overheat alarm (OH)
      #06 : Servo alarm (SV)
      #07 : Data I/O error (SR)
      #08 : Macro alarm (MC)
      #09 : Spindle alarm (SP)
      #10 : Other alarm(DS) (DS)
      #11 : Alarm concerning Malfunction prevent functions (IE)
      #12 : Background P/S (BG)
      #13 : Syncronized error (SN)
      #14 : (reserved)
      #15 : External alarm message (EX)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alarm out

    Pointer to the ODBALM structure including the alarm status information.

    The ODBALM structure is as follows.
        typedef struct odbalm {
             short  dummy[2] ;          /* Not used. */
             short  data ;              /* Alarm status */
        } ODBALM ;
        
    dummy
    Not used.
    data
    Alarm status
    The meaning of each bit is as follows.

    #00 : Parameter switch on (SW)
    #01 : Power off parameter set (PW)
    #02 : I/O error (IO)
    #03 : Foreground P/S (PS)
    #04 : Overtravel,External data (OT)
    #05 : Overheat alarm (OH)
    #06 : Servo alarm (SV)
    #07 : Data I/O error (SR)
    #08 : Macro alarm (MC)
    #09 : Spindle alarm (SP)
    #10 : Other alarm(DS) (DS)
    #11 : Alarm concerning Malfunction prevent functions (IE)
    #12 : Background P/S (BG)
    #13 : Syncronized error (SN)
    #14 : (reserved)
    #15 : External alarm message (EX)

    ERRORS

    Code Description
    EW_PARAM(Only Series 15) CNC parameter error

  • Series 15
  • The CNC parameter 7613#0 has been 0 since CNC was turned on.
    Set 7613#0=1.
    Note) 7613#0 has modified 0 from 1, no error occurs, but the data is invalid.

    misc\cnc_alarm2

    Reads the alarm status of CNC. This function is the improved version of the cnc_alarm function.

    This function is used for watching CNC's alarm status, displaying the maintenance information or guidance of how to reset the alarm, etc.

    When CNC falls into the system alarm, it is completely impossible to communicate data with CNC, and the alarm status cannot be acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_alarm2(unsigned short FlibHndl, long *alarm);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alarm out

    Specify the address of the variable which is set the alarm status.

    The meaning of each bit is as follows.


    • Series 15i
    • #00 : Background P/S (BG)
      #01 : Foreground P/S (PS)
      #02 : (Not used)
      #03 : (Not used)
      #04 : Syncronized error (SN)
      #05 : Parameter switch on (SW)
      #06 : Overtravel,External data (OT)
      #07 : PMC error (PC)
      #08 : External alarm message (1) (EX)
      #09 : (Not used)
      #10 : Serious P/S (SR)
      #11 : (Not used)
      #12 : Servo alarm (SV)
      #13 : I/O error (IO)
      #14 : Power off parameter set (PW)
      #15 : System alarm (SY)
      #16 : External alarm message (2) (EX)
      #17 : External alarm message (3) (EX)
      #18 : External alarm message (4) (EX)
      #19 : Macro alarm (MC)
      #20 : Spindle alarm (SP)
      #21 to 31 : (Not used)
    • Series 16i/18i/21i, 0i-A/B/C, Power Mate i (only Ethernet)
    • #00 : P/S100
      #01 : P/S000
      #02 : P/S101
      #03 : P/Salarm except above
      #04 : Overtravel alarm
      #05 : Overheat alarm
      #06 : Servo alarm
      #07 : System alarm
      #08 : APC alarm
      #09 : Spindle alarm
      #10 : P/S alarm(No.5000,..), Punchpress alarm
      #11 : Laser alarm
      #12 : (Not used)
      #13 : Rigid tap alarm
      #14 : (Not used)
      #15 : External alarm message
      #16 to 31 : (Not used)
    • Series 30i, 0i-D/F, PMi-A
    • #00 : Parameter switch on (SW)
      #01 : Power off parameter set (PW)
      #02 : I/O error (IO)
      #03 : Foreground P/S (PS)
      #04 : Overtravel,External data (OT)
      #05 : Overheat alarm (OH)
      #06 : Servo alarm (SV)
      #07 : Data I/O error (SR)
      #08 : Macro alarm (MC)
      #09 : Spindle alarm (SP)
      #10 : Other alarm(DS) (DS)
      #11 : Alarm concerning Malfunction prevent functions (IE)
      #12 : Background P/S (BG)
      #13 : Syncronized error (SN)
      #14 : (reserved)
      #15 : External alarm message (EX)
      #16 : (reserved)
      #17 : (reserved)
      #18 : (reserved)
      #19 : PMC error (PC)
      #20 to 31 : (Not used)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alarm out

    Specify the address of the variable which is set the alarm status.

    The meaning of each bit is as follows.

    #00 : Parameter switch on (SW)
    #01 : Power off parameter set (PW)
    #02 : I/O error (IO)
    #03 : Foreground P/S (PS)
    #04 : Overtravel,External data (OT)
    #05 : Overheat alarm (OH)
    #06 : Servo alarm (SV)
    #07 : Data I/O error (SR)
    #08 : Macro alarm (MC)
    #09 : Spindle alarm (SP)
    #10 : Other alarm(DS) (DS)
    #11 : Alarm concerning Malfunction prevent functions (IE)
    #12 : Background P/S (BG)
    #13 : Syncronized error (SN)
    #14 : (reserved)
    #15 : External alarm message (EX)
    #16 : (reserved)
    #17 : (reserved)
    #18 : (reserved)
    #19 : PMC error (PC)
    #20 to 31 : (Not used)

    ERRORS

    Code Description

    misc\cnc_cexesramsize

    Reads the maximum size of the SRAM variable area for C language executor. The maximum size is read by the unit of byte.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_cexesramsize(unsigned short FlibHndl, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length out

    Pointer to the maximum size storage area.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    The user application is not built into CNC.
    The C language executor library does not support this function.
    EW_NOOPT No option
    The C language executor function and the extended driver/library function are necessary.

    misc\cnc_chgprotbit

    Sets the state of various NC data protection (protection pattern data).
    The protection pattern data is bit pattern data which collects flags corresponding to various NC data. It is for MTB and for the end user.
    This data should be set on each NC, and the data is read to the application during the start of application by the Ethernet library in the each process (copy image of the protection pattern data).
    In this function, the copy image of the protection pattern data can be changed. The copy image of the protection pattern data is independent at each process, and the change is effective only to the one which the process by which this function is issued maintains.

    Please specify the same key word as the password set on NC for the argument when changing.
    Especially, when 0 is specified for the key word, the copy image of the protection pattern data is reset in the original data set on NC.
    Error code EW_PASSWD returns when an incorrect key word is specified.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_chgprotbit(unsigned short FlibHndl, short user_id, unsigned char *pattern, long keyword);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    user_id in

    The user (MTB and the end user) who protects the NC data is specified.

    1 : MTB
    2 : End user
    pattern in/out
    It is a pointer to data which stores the bit pattern by which the NC data which removes protection is specified. Please secure the consecutive area in four bytes to store data.
    When one is set to the bit, it is meant to remove corresponding NC data protection.
    The meaning of each bit is as follows.
      pattern[0]
      bit 0 : F-ROM user file(PMC ladder)
      bit 1 : F-ROM user file(C language executor)
      bit 2 : F-ROM user file(Macro executor/Order-made macro)
      bit 3 : F-ROM user file(PMC C language)
      bit 4 : F-ROM user file(Maintenance information)
      bit 5 : F-ROM user file(Embedded macro function)
      bit 6 : (Reserved)
      bit 7 : Image of the entire S-RAM
      pattern[1]
      bit 0 : NC programs
      bit 1 : P code macro variables
      bit 2 : NC parameters
      bit 3 : PMC parameters(R [Internal relay],T [Changeable timer],K [Keep relay],C [Counter],D [Data table])
      bit 4 to 7 : (Reserved)
      pattern[2]
      bit 0 to 7 : (Reserved)
      pattern[3]
      bit 0 to 7 : (Reserved)

    After the function is executed, the current bit pattern by which the modified state of various NC data protection is shown is returned.

    keyword in

    It is a key word transmitted to NC . The decimal number of eight digits or less can be specified.
    NC data protection corresponding to the bit pattern specified for pattern is released if this keyword matches to the password preserved in NC.
    Especially, when 0 is specified for the keyword, the copy image of the protection pattern data is reset in the original data set on NC.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    The NC control software or the Ethernet firmware does not support this function.
    EW_NUMBER Data number error
    The specification of user_id is wrong.
    EW_PASSWD The given key word is not correct.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Errors other than EW_PASSWD
    1 : Key word is different from the password (in trial limit)
    2 : The trial limit (three times) has been expired.
    When err_no = 2, the value of the trial counter is returned at member err_dtno of the ODBERR structure. In this case, it is necessary to reset the trial counter by reentering the power of NC.

    misc\cnc_clralm

    Clears the CNC alarm state specified by "id".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clralm(unsigned short FlibHndl, short id);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    id in

    Specify the kind of CNC alarm to be cleared

    0 : clear PS100 alarm (30i, 0i-D/F, PMi-A:SW100)
    (corresponds to [CAN]+[RESET] on the MDI operation)
    1 : clear PS101 alarm (This alarm does not occur at 30i, 0i-D/F, PMi-A)
    (corresponds to [PROG]+[RESET] on the MDI operation)
    After the execution, CNC will be in the RESET state.


    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The kind of CNC alarm(id) is invalid.

    misc\cnc_diagnosr

    Reads the diagnosis data specified by "s_number","e_number","axis"(only for the diagnosis data with axis). The data format depends on each diagnosis data. The format of Byte/Word/2-Word diagnosis data is generally signed binary.

    Reads the diagnosis data for all axes specified range by specifying 'ALL_AXES' in 'axis'.

    The attribute of CNC diagnosis data depends on the type and axis, and it is different for each diagnosis data. It is as follows, and can be got by cnc_rddiaginfo function.

    Diagnosis data type Meaning Byte size
    Bit diagnosis data Every bits have each definition. 1
    Bit diagnosis data with axis Every bits have each definition. (each axis) 1
    Byte diagnosis data 1-byte data is stored. 1
    Byte diagnosis data with axis 1-byte data is stored. (each axis) 1
    Word diagnosis data 2-byte data is stored. 2
    Word diagnosis data with axis 2-byte data is stored. (each axis) 2
    2-Word diagnosis data 4-byte data is stored. 4
    2-Word diagnosis data with axis 4-byte data is stored. (each axis) 4
    Real diagnosis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real diagnosis with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit diagnosis data bit by bit. 8 bits (i.e. 1 byte) which belong to the same diagnosis data number are read at the same time.

    See the "MAINTENANCE MANUAL" of CNC for details of each diagnosis data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_diagnosr(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *diag);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start diagnosis data number. The first diagnosis data number which was read actually is returned.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    e_number in/out Specify the end diagnosis data number. The last diagnosis data number which was read actually is returned.

    The new diagnosis data may be added according to updating CNC software, addition of the new function, etc. If the new diagnosis data is added within reading range, the error(Return:EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing diagnoses as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis (m=maximum controlled axes)
    ALL_AXES : assigns all axes (ALL_AXES=-1)

    None axis type diagnosis data can be read even if any value is specified in "axis". In case that an axis type diagnosis data exists in the specified range, the error(Retuen:EW_ATTRIB) is returned by specifying "axis=0".

    length in Specify the data block length which is enough to store the specified diagnosis data.

    The structure per 1 diagnosis data is as follows, and each diagnosis data is lined up in order of number.

    [= Sum of (4+(byte size of each diagnosis data) * (number of axis))]
    Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of diagnosis data is 2 byte, the ODBDGN structure is as follows. In case that the size of diagnosis data is 1 or 2 byte and the length per 1 diagnosis data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    ODBDGN

    no axis/1 axis all axes
    n : Maximum controlled axes
    diag out

    Pointer to the area to store the diagnoses. Each diagnosis data can be referred by using the ODBDGN structure.

                            
  • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
  • typedef struct odbdgn { short datano; /* diagnosis data number */ short type; /* upper byte:type */ /* lower byte:axis */ union { char cdata; /* bit/byte diagnosis data */ short idata; /* word diagnosis data */ long ldata; /* 2-word diagnosis data */ char cdatas[MAX_AXIS]; /* bit/byte diagnosis data with axis*/ short idatas[MAX_AXIS]; /* word diagnosis data with axis */ long ldatas[MAX_AXIS]; /* 2-word diagnosis data with axis */ } u ; } ODBDGN ; /* MAX_AXIS : max. controlled axes */
                            
  • Series 15i, 30i, 0i-D/F, PMi-A
  • typedef struct realdgn { /* real diagnosis data */ long dgn_val; /* value of variable */ long dec_val; /* number of places of decimals */ } REALDGN ; typedef struct odbdgn { short datano; /* diagnosis data number */ short type; /* upper byte:type */ /* lower byte:axis */ union { char cdata; /* bit/byte diagnosis data */ short idata; /* word diagnosis data */ long ldata; /* 2-word diagnosis data */ REALDGN rdata; /* real diagnosis data */ char cdatas[MAX_AXIS];/*bit/byte diagnosis data with axis*/ short idatas[MAX_AXIS];/* word diagnosis data with axis */ long ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */ REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */ } u ; } ODBDGN ; /* MAX_AXIS : max. controlled axes */
    datano
    diagnosis data number which was read is stored.
    type
    Attribute of diagnosis data which was read is stored.
    Upper byte : type
    0 : byte type
    1 : word type
    2 : 2-word type
    3 : bit type(8 bit)
    4 : bit type(1 bit : except Series 15/15i)
    5 : real type(Series 15i, 30i, 0i-D/F, PMi-A)
    Lower byte : axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas (Series 15i, 30i, 0i-D/F, PMi-A)
    Real diagnosis data is stored.
    The value of variable is stored in dgn_val, and the number of places of decimals is stored in dec_val.

    Real diagnosis data = dgn_val * 10 ** (-dec_val)

    (Example) When the value of real diagnosis data is 12.345, dgn_val and dec_val are read as follows.

    dgn_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start diagnosis data number. The first diagnosis data number which was read actually is returned.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    e_number in/out Specify the end diagnosis data number. The last diagnosis data number which was read actually is returned.

    The new diagnosis data may be added according to updating CNC software, addition of the new function, etc. If the new diagnosis data is added within reading range, the error(Return:EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing diagnoses as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis (m=maximum controlled axes)
    ALL_AXES : assigns all axes (ALL_AXES=-1)

    None axis type diagnosis data can be read even if any value is specified in "axis". In case that an axis type diagnosis data exists in the specified range, the error(Retuen:EW_ATTRIB) is returned by specifying "axis=0".

    length in Specify the data block length which is enough to store the specified diagnosis data.

    The structure per 1 diagnosis data is as follows, and each diagnosis data is lined up in order of number.

    [= Sum of (4+(byte size of each diagnosis data) * (number of axis))]
    Because the size of data which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of diagnosis data is 2 byte, the ODBDGN structure is as follows. In case that the size of diagnosis data is 1 or 2 byte and the length per 1 diagnosis data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    ODBDGN

    no axis/1 axis all axes
    n : Maximum controlled axes
    diag out

    Pointer to the area to store the diagnoses. Each diagnosis data can be referred by using the ODBDGN structure.

    
    typedef struct realdgn {       /* real diagnosis data */
       long   dgn_val;             /* value of variable */
       long   dec_val;             /* number of places of decimals */
    } REALDGN ;
    
    typedef struct odbdgn {
       short  datano;              /* diagnosis data number */
       short  type;                /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte diagnosis data */
          short   idata;           /* word diagnosis data */
          long    ldata;           /* 2-word diagnosis data */
          REALDGN rdata;           /* real diagnosis data */
          char    cdatas[MAX_AXIS];/* bit/byte diagnosis data with axis */
          short   idatas[MAX_AXIS];/* word diagnosis data with axis */
          long    ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */
          REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */
       } u ;
    } ODBDGN ;                /* MAX_AXIS : max. controlled axes */
    
    datano
    diagnosis data number which was read is stored.
    type
    Attribute of diagnosis data which was read is stored.
    Upper byte : type
    0 : byte type
    1 : word type
    2 : 2-word type
    3 : bit type(8 bit)
    4 : bit type(1 bit)
    5 : real type
    Lower byte : axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real diagnosis data is stored.
    The value of variable is stored in dgn_val, and the number of places of decimals is stored in dec_val.

    Real diagnosis data = dgn_val * 10 ** (-dec_val)

    (Example) When the value of real diagnosis data is 12.345, dgn_val and dec_val are read as follows.

    dgn_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of area to store diagnosis data (length) is wrong.
    EW_NUMBER Data number error
    diagnosis data number (s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number (axis) is wrong.

    misc\cnc_diagnoss

    Reads the diagnosis specified by "number","axis" (only for the diagnosis with axis). The data format depends on each diagnosis. The format of Byte/Word/2-Word diagnosis is generally signed binary.

    Reads the diagnosis for all axes once by specifying 'ALL_AXES' in 'axis'. The diagnosis for each axis is stored in each array of "ODBDGN".

    The attribute of diagnosis depends on the type and axis, and it is different for each diagnosis. It is as follows, and can be got by cnc_rddiaginfo function.

    Diagnosis data type Meaning Byte size
    Bit diagnosis data Every bits have each definition. 1
    Bit diagnosis data with axis Every bits have each definition. (each axis) 1
    Byte diagnosis data 1-byte data is stored. 1
    Byte diagnosis data with axis 1-byte data is stored. (each axis) 1
    Word diagnosis data 2-byte data is stored. 2
    Word diagnosis data with axis 2-byte data is stored. (each axis) 2
    2-Word diagnosis data 4-byte data is stored. 4
    2-Word diagnosis data with axis 4-byte data is stored. (each axis) 4
    Real diagnosis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real diagnosis with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit diagnosis data bit by bit. 8 bits (i.e. 1 byte) which belong to the same diagnosis number are read at the same time.

    See the "MAINTENANCE MANUAL" of CNC for details of each diagnosis.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_diagnoss(unsigned short FlibHndl, short number, short axis, short length, ODBDGN *diag);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the diagnosis number.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis (m=maximum controlled axes)
    ALL_AXES : assigns all axes (ALL_AXES=-1)
    length in

    Specify the data block length(size of ODBDGN structure).

    4+(byte size of diagnosis data) * (number of axis)

    In case that the size of diagnosis data is 4 byte, the ODBDGN structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 1, 2, or 8 byte.

    ODBDGN
    no axis/1 axis all axes
    Series 15/15i, 30i, 0i-D/F, PMi-A : n = Maximum controlled axes
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i : n = Current controlled axes
    diag out

    Pointer to the ODBDGN structure including the diagnosis data.

    The ODBDGN structure is as follows.
                            
  • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
  • typedef struct odbdgn { short datano; /* diagnosis data number */ short type; /* upper byte:type */ /* lower byte:axis */ union { char cdata; /* bit/byte diagnosis data */ short idata; /* word diagnosis data */ long ldata; /* 2-word diagnosis data */ char cdatas[MAX_AXIS]; /* bit/byte diagnosis data with axis*/ short idatas[MAX_AXIS]; /* word diagnosis data with axis */ long ldatas[MAX_AXIS]; /* 2-word diagnosis data with axis */ } u ; } ODBDGN ; /* MAX_AXIS : max. controlled axes */
                            
  • Series 15i, 30i, 0i-D/F, PMi-A
  • typedef struct realdgn { /* real diagnosis data */ long dgn_val; /* value of variable */ long dec_val; /* number of places of decimals */ } REALDGN ; typedef struct odbdgn { short datano; /* diagnosis data number */ short type; /* upper byte:type */ /* lower byte:axis */ union { char cdata; /* bit/byte diagnosis data */ short idata; /* word diagnosis data */ long ldata; /* 2-word diagnosis data */ REALDGN rdata; /* real diagnosis data */ char cdatas[MAX_AXIS];/*bit/byte diagnosis data with axis*/ short idatas[MAX_AXIS];/* word diagnosis data with axis */ long ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */ REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */ } u ; } ODBDGN ; /* MAX_AXIS : max. controlled axes */
    datano
    diagnosis data number which was read is stored.
    type
    Attribute of diagnosis data which was read is stored.
    Upper byte:type (Series 15/15i)
    0 : byte type
    1 : word type
    2 : 2-word type
    3 : bit type (8 bit)
    4 : not used
    5 : real type (Series 15i)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis (m=maximum controlled axes)
    ALL_AXES : all axes (ALL_AXES=-1)
    rdata, rdatas (Series 15i, 30i, 0i-D/F, PMi-A)
    Real diagnosis data is stored.
    The value of variable is stored in dgn_val, and the number of places of decimals is stored in dec_val.

    Real diagnosis data = dgn_val * 10 ** (-dec_val)

    (Example) When the value of real diagnosis data is 12.345, dgn_val and dec_val are read as follows.

    dgn_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the diagnosis data number.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis data number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis (m=maximum controlled axes)
    ALL_AXES : assigns all axes (ALL_AXES=-1)
    length in

    Specify the data block length(size of ODBDGN structure).

    4+(byte size of diagnosis data) * (number of axis)

    In case that the size of diagnosis data is 4 byte, the ODBDGN structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 diagnosis data or 1 axis is 1, 2, or 8 byte.

    ODBDGN
    no axis/1 axis all axes
    n : Maximum controlled axes
    diag out

    Pointer to the ODBDGN structure including the diagnosis data.

    The ODBDGN structure is as follows.
    typedef struct realdgn {         /* real diagnosis data */
        long   dgn_val;              /* value of variable */
        long   dec_val;              /* number of places of decimals */
    } REALDGN ;
    
    typedef struct odbdgn {
        short  datano;               /* diagnosis data number */
        short  type;                 /* axis */
        union {
            char    cdata;           /* bit/byte diagnosis data */
            short   idata;           /* word diagnosis data */
            long    ldata;           /* 2-word diagnosis data */
            REALDGN rdata;           /* real diagnosis data */
            char    cdatas[MAX_AXIS];/* bit/byte diagnosis data with axis */
            short   idatas[MAX_AXIS];/* word diagnosis data with axis */
            long    ldatas[MAX_AXIS];/* 2-word diagnosis data with axis */
            REALDGN rdatas[MAX_AXIS];/* real diagnosis data with axis */
        } u ;
    } ODBDGN ;                /* MAX_AXIS : max. controlled axes */
    
    datano
    diagnosis data number which was read is stored.
    type
    Attribute of diagnosis data which was read is stored.
    0 : assigns no axis
    1,..,m : assigns 1 axis (m=maximum controlled axes)
    ALL_AXES : all axes (ALL_AXES=-1)
    rdata, rdatas
    Real diagnosis data is stored.
    The value of variable is stored in dgn_val, and the number of places of decimals is stored in dec_val.

    Real diagnosis data = dgn_val * 10 ** (-dec_val)

    (Example) When the value of real diagnosis data is 12.345, dgn_val and dec_val are read as follows.

    dgn_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ODBDGN structure (length) is wrong.
    EW_NUMBER Data number error
    diagnosis data number (number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number (axis) is wrong.

    misc\cnc_fromget

    Reads the F-ROM data from CNC.
    After F-ROM data reading, execute cnc_fromgetend function in order to indicate the termination of reading process.

    The procedure for reading F-ROM data and storing into the file is as follows.

    Any file name can be specified for the file in which F-ROM data will be stored.

    Internal 128KB buffer is prepared for data reading.
    In this function, the F-ROM data is read from CNC every 128 Kbyte block and then the data is output to the application.
    It takes for a while to read the 128 Kbyte block of F-ROM data from CNC.
    This function waits its process completion in the library.

    The total size which can be read finally is F-ROM size(fromsize) acquired by the cnc_getfrominfo function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromget(unsigned short FlibHndl, short *stat, void *data, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stat out

    Specify the address of the variable in which the reading state of F-ROM is stored.

    0 : End of reading process
    1 : Reading process continued

    Call the cnc_fromgetend function in case of stat=0.

    data out

    Pointer to the variable to which the reading data is stored.
    Specify the pointer of the variable to which the F-ROM data is stored.

    length in/out

    Pointer to the variable to which the data length was set.
    (Please set the value of 256 or more in the variable.)
    Specify the size in byte which you want to read to the variable. After executing this function, the size of data which was actually read is set.
    The maximum size which can be read at a time is F-ROM size (fromsize) acquired by the cnc_getfrominfo function.


    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_fromgetstart function has not been executed.
    EW_BUFFER Buffer empty/full
    Retry because the buffer is empty.
    EW_LENGTH Number of data(length) is wrong. (The value of 0 or less was specified).
    EW_DATA F-ROM data reading error.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    5 : The F-ROM data of the specified name does not exist.(The F-ROM data specified by cnc_fromgetstart does not exist)
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    EW_PROT protection error

    misc\cnc_fromgetend

    Indicates the termination of reading the F-ROM data from CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromgetend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_fromgetstart function has not been executed.
    EW_DATA function has not been executed
    When the EW_DATA error occurred at cnc_fromget function, the same return value is returned. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    5 : The F-ROM data of the specified name does not exist. (The F-ROM data specified by cnc_fromgetstart s not exist)
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    144 : All the F-ROM data is not read. The cnc_fromget function was called in the state of argument stat=1, at cnc_fromgetend function.

    misc\cnc_fromgetstart

    Indicates the start of reading the F-ROM data from CNC.
    However, the system control software cannot be read.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromgetstart(unsigned short FlibHndl, short slotno, char *name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slotno in Physical slot number (0,1,2,...,15)
    Specify the physical slot number of control P.C.B. where F-ROM from which you want to read data is mounted.
    name in The name of the system data which you want to read.
    Specify the System data name (sysname) acquired by cnc_getfrominfo function.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_BUSY Busy
    cnc_fromgetstart function has been already executed.
    Terminate a reading process by using cnc_fromgetend function.
    EW_DATA Error when function was executed
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    -2 : F-ROM(MODULE) is not mounted on the specified slot.
    5 : The F-ROM data of the specified name does not exist.
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    10 : The specified slot does not exist.
    EW_REJECT Similar processing (information reading/data reading/data writing) is being executed on the CNC side. Please retry.
    EW_PASSWD Specified F-ROM data cannot be read because the data is protected.

    misc\cnc_fromput

    Writes the F-ROM data to CNC.
    After F-ROM data writing, execute cnc_fromputend function in order to indicate the termination of writing process.

    The procedure for reading F-ROM data from the file and storing into the F-ROM on the CNC is as follows.

    Internal 128KB buffer is prepared for data writing.
    When the data transferred by the cnc_fromput function becomes 128KB (at the first time, 128KB+128bytes), the CNC executes the writing process to F-ROM.

    It takes for a while to write the 128K Byte block of F-ROM data to CNC.
    This function waits its process completion in the library.

    When this function writes the F-ROM data to CNC, the error (such as EW_DATA) may happen, so please check the return value of this function at your application.

    The Size of SYSTEM data(Control software, Ladder program etc.) is 128K Bytes * n(n=1,2,3,...) + 128 Bytes. You must write all data from F-ROM file by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromput(unsigned short FlibHndl, void *data, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data in

    Pointer to the variable to which the writing data is stored.
    Specify the pointer of the variable to which the F-ROM data is written.

    length in/out

    Pointer to the variable to which the data length was set.
    Specify the size in byte which you want to write to the variable. After executing this function, the size of data which was actually written is set.
    The maximum size which can be written at a time is F-ROM size (fromsize) acquired by the cnc_getfrominfo function.

    Note) When the F-ROM data is protected, this function returns EW_PASSWD.
    The error occurs as soon as turning out the name of the F-ROM data because the name is preserved in the given writing data. The name of the F-ROM data is described from top of the F-ROM data within 672 bytes, so please specify 672 bytes or more for the length.

    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_fromputstart function has not been executed.
    EW_BUFFER Buffer full
    Retry because the buffer is full.
    EW_LENGTH Number of data(length) is wrong. (The value of 0 or less was specified).
    EW_DATA F-ROM data writing error.
    In order to get more information for this err_no return value, execute cnc_getdtailerr . The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : F-ROM writing failed (defective device)
    3 : F-ROM erasing failed (defective device)
    6 : No writing space in F-ROM
    7 : The F-ROM data not permitted at the CNC system was specified.
    8 : The size of the system data actually written on the F-ROM and the system data being specified is different.
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    145 : The total data size is excessed.
    The excessed F-ROM data is ignored.
    EW_PASSWD Specified F-ROM data cannot be written because the data is protected.

    misc\cnc_fromputend

    Indicates the termination of writing the F-ROM data to CNC.

    This function waits until the termination of writing process of the F-ROM data on CNC.

    When the return value(EW_DATA(detail status : 146)) is acquired in this function, the writing F-ROM data is processed as follows.

    The lacked area for F-ROM data on CNC is buried by code, 0xFF.

    A necessary writing data size is automatically decided by the content of the FROM data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromputend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_fromputstart function has not been executed
    EW_DATA F-ROM data writing error.
    When the EW_DATA error occurred by cnc_fromput function, the same return value is returned. In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : F-ROM writing failed (defective device)
    3 : F-ROM erasing failed (defective device)
    6 : No writing space in F-ROM
    7 : The F-ROM data not permitted at the CNC system was specified.
    8 : The size of the system data actually written on the F-ROM and the system data being specified is different.
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    145 : The total data size is excessed.
    The excessed F-ROM data is ignored.
    146 : There was lack in the writing F-ROM data.
    (This error code can be disregarded, in case of writing some user file)

    misc\cnc_fromputstart

    Indicates the start of writing the F-ROM data to CNC.
    The data which can be written in F-ROM is system data (CNC Control software and Ladder program, etc.), but any other data cannot be written.
    However, the system control software cannot be written.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromputstart(unsigned short FlibHndl, short slotno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slotno in

    Physical slot number(0,1,2,...,15)
    Specify the physical slot number of control P.C.B. where F-ROM to which you want to write data is mounted.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_BUSY Busy
    cnc_fromputstart function has been already executed.
    Terminate a reading process by using cnc_fromputend function.
    EW_DATA The specified slot does not exist.
    EW_REJECT Similar processing (information reading/data reading/data writing) is being executed on the CNC side. Please retry.

    misc\cnc_fromremove

    Deletes the System data from F-ROM on CNC.
    However, the system control software cannot be deleted in the Ethernet version.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_fromremove(unsigned short FlibHndl, short slotno, char *name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slotno in

    Physical slot number (0,1,2,...,15)
    Specify the physical slot number of control P.C.B. where F-ROM which you want to delete is mounted.

    name in

    The name of the system data which you want to delete.
    Specify the System data name (sysname) acquired by cnc_getfrominfo function.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_DATA The error occurred during deleting the F-ROM data.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    3 : F-ROM erasing failed (defective device)
    5 : The F-ROM data of the specified name does not exist.
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    10 : The specified slot does not exist.
    EW_REJECT The specified slot does not exist.
    EW_PASSWD Specified F-ROM data cannot be deleted because the data is protected.

    misc\cnc_getdtailerr

    Gets the detailed error information after the function has been executed.

      The detailed error information is stored in "err_no", "err_dtno" of "ODBERR".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getdtailerr(unsigned short FlibHndl, ODBERR *err);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    err out

    Pointer to the ODBERR structure to set the detailed error information.

    The ODBERR structure is as follows.
    typedef struct odberr{
            short   err_no;         /* Detailed error */
            short   err_dtno;       /* Data number on error */
    } ODBERR ;
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    misc\cnc_getfigure

    Reads the maximum valid figures and the number of decimal places under the input/output unit, which is related to various data of CNC.

    The value which is read by the window library is binary data under the unit of the CNC side. Therefore, it is nesessary to display a decimal point, etc. in consideration of the unit.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getfigure(unsigned short FlibHndl, short data_type,short *valid_fig, short *dec_fig_in, short *dec_fig_out);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_type

    Specify the kind of the data.

    0 : axis type data
    1 : tool offset
    2 : custom macro
    3 : work zero offset (only for Series 16i-W/18i-W)(axis type data). Specify "data_type = 0" excluding Series 16i-W/18i-W.
    4 : cutting feedrate (only for Series 16i-W/18i-W)
    valid_fig

    Specify the address of the variable to store the maximum valid figures.

    dec_fig_in

    Specify the address of the array to store the number of decimal places under the input unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.)

    dec_fig_out

    Specify the address of the array to store the number of decimal places under the output unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.)

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_type

    Specify the kind of the data.

    0 : axis type data
    1 : tool offset
    2 : custom macro
    valid_fig

    Specify the address of the variable to store the maximum valid figures.

    dec_fig_in

    Specify the address of the array to store the number of decimal places under the input unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.)

    dec_fig_out

    Specify the address of the array to store the number of decimal places under the output unit. The number of array must be equal to the number of maximum controlled axis. (Except axis type data, only the top of array is valid.)


    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    Kind of data (data_type) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_getfrominfo

    Reads the various information of F-ROM on CNC. The various information is stored in each member of "ODBFINFORM".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getfrominfo(unsigned short FlibHndl, short slotno, short *num, ODBFINFORM *finfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slotno in Physical slot number (0,1,2,...,15 or -1)
    Specify the physical slot number of control P.C.B. where F-ROM is mounted.
    Especially, if you set the '-1', all F-ROM information in the CNC can be read.
    When this function is executed as 'slotno=-1', the effective F-ROM information is packed from a head of the address shown by this argument.
    num out Pointer to the variable by which the number of FROM information (ODBFINFORM structure) actually read is stored.
    When a physical slot number of the P.C.B which does not exist in slotno is specified, the '0' is set in *num.
    finfo out

    Specify the address of the array of ODBFINFORM structure storing the F-ROM information.
    Please prepare 1 or 16 arrays according to slotno.

    ODBFINFORM structure is as follows.
    typedef struct odbfinform {
        long  slotno;            /* Slot Number */
        char  slotname[12];      /* Slot Name */
        long  fromnum;           /* Number of F-ROM SYSTEM data */
        struct {
            char  sysname[12];   /* F-ROM SYSTEM data Name */
            long  fromsize;      /* F-ROM Size */
            long  fromattrib;    /* F-ROM Data attribute */
        } info[128];
    } ODBFINFORM;
    
    slotno
    Slot number which belongs to the read F-ROM information.
    slotname
    Slot Name
    This data is terminated with 'NULL'.
    fromnum
    The number of SYSTEM data(SYSTEM Control software, Ladder program etc.) which has been stored in F-ROM.
    sysname
    The name of SYSTEM data which was stored in F-ROM
    When the F-ROM data is read, this name must be specified.
    This data is terminated with 'NULL'.
    fromsize
    F-ROM size for storing SYSTEM data. (Unit:Byte)
    This data can be used for checking the reading size or the writing size.
    fromattrib
    File attribute of F-ROM data.
    1 : System file
    2 : User file

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_DATA Error when function was executed
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure. And the slot number where an error occurred will be set in err_dtno of ODBERR structure.
    9 : F-ROM(MODULE) cannot be recognized. (defective device)
    EW_REJECT Similar processing (information reading/data reading/data writing) is being executed on the CNC side. Please retry.

    misc\cnc_getlanguage

    The display language of NC is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getlanguage(unsigned short FlibHndl, short *language);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the address of the variable to store the maximum valid figures.

    language out

    Specify the pointer to store the display language of NC.

    0 : English
    1 : Japanease
    2 : German
    3 : French
    4 : Chinese
    5 : Italian
    6 : Korean
    7 : Spanish
    8 : Dutch
    9 : Danish
    10 : Portuguese
    11 : Polish
    12 : Hungarian
    13 : Swedish
    14 : Czech Republic
    15 : Simplified Chinese
    16 : Russian


    ERRORS

    Code Description

    misc\cnc_getlockstat

    Gets the present state of various NC data protection.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getlockstat(unsigned short FlibHndl, short user_id, unsigned char *pattern);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    user_id in

    The user (MTB and the end user) who protects the NC data is specified.

    1 : MTB
    2 : End user

    pattern out

    It is a pointer to data which stores the bit pattern by which the NC data to be protected is shown.
    Please secure the consecutive area in four bytes to store data. It is shown that the data is protected (Access inhibited) when the bit is set to one.
    The meaning of each bit is as follows.

      pattern[0]
      bit 0 : F-ROM user file(PMC ladder)
      bit 1 : F-ROM user file(C language executor)
      bit 2 : F-ROM user file(Macro executor/Order-made macro)
      bit 3 : F-ROM user file(PMC C language)
      bit 4 : F-ROM user file(Maintenance information)
      bit 5 : F-ROM user file(Embedded macro function)
      bit 6 : (Reserved)
      bit 7 : Image of the entire S-RAM
      pattern[1]
      bit 0 : NC programs
      bit 1 : P code macro variables
      bit 2 : NC parameters
      bit 3 : PMC parameters(R [Internal relay],T [Changeable timer],K [Keep relay],C [Counter],D [Data table])
      bit 4 to 7 : (Reserved)
      pattern[2]
      bit 0 to 7 : (Reserved)
      pattern[3]
      bit 0 to 7 : (Reserved)

    Moreover, when each bit is set to one, the functions that return EW_PASSWD are as follows.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    The NC control software or the Ethernet firmware does not support this function.
    EW_NUMBER Data number error
    The specification of user_id is wrong.

    misc\cnc_getpath

    Reads the current selected path number which is the target path of the Data window functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getpath(unsigned short FlibHndl, short *path_no, short *maxpath_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path_no in

    Specify the address of the variable which is set the path number.

    0 : (The 1st path)
    1 : The 1st path
    2 : The 2nd path
    3 : The 3rd path
    4 : The 4th path (Only Series 30i)
    5 : The 5th path/for loader
    6 : The 6th path (Only Series 30i)
    7 : The 7th path (Only Series 30i)
    8 : The 8th path (Only Series 30i)
    9 : The 9th path (Only Series 30i)
    10 : The 10th path (Only Series 30i)
    maxpath_no out

    Specify the address of the variable which is set the maximum path number.

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path_no in Specify the address of the variable which is set the path number.

    ERRORS

    Code Description

    misc\cnc_getsraminfo

    Reads the various information of S-RAM on CNC.
    The various information is stored in each member of "ODBSINFO".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getsraminfo(unsigned short FlibHndl, ODBSINFO *sinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sinfo out

    Specify the address of the array of ODBSINFO structure storing the S-RAM information.

    ODBSINFO structure is as follows.
    typedef struct odbsinfo {
        long  sramnum;          /* Number of S-RAM data */
        struct {
            char  sramname[12]; /* S-RAM data Name */
            long  sramsize;     /* S-RAM data Size */
            short divnumber;    /* Division number of S-RAM file */
            char  fname[6][16]; /* S-RAM file names */
        } info[8];
    } ODBSINFO;
    
    sramnum
    Number of S-RAM data
    sramname
    Name of S-RAM data(name of control P.C.B. where S-RAM is mounted).
    This data is terminated with 'NULL'.
    sramsize
    Size of S-RAM data (Unit: Byte)
    divnumber
    Number of file division to store the read S-RAM data
    Each size of the file is calculated as follows.
    Size of file = sramsize / divnumber
    fname
    File name to store the read S-RAM data. (This file name includes the extension.)
    Each data is terminated with 'NULL'.
    S-RAM data can be restored by the Boot function of the system. At the Boot function, the S-RAM data cannot be restored if the file name is other than 'fname'.

    ERRORS

    Code Description
    EW_FUNC Unavailable

    misc\cnc_gettimer

    Gets the date or time data from the calendar timer device of the CNC unit.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_gettimer(unsigned short FlibHndl, IODBTIMER *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf out

    Pointer to the IODBTIMER structure including the date or time of CNC.

    The IODBTIMER structure is as follows.
    typedef struct iodbtimer {
            short   type ;          /* Spec. of date or time. */
            short   dummy ;         /* Not used. */
            union {
                    struct {
                            short   year ;  /* Year. */
                            short   month ; /* Month. */
                            short   date ;  /* Date. */
                    } date ;
                    struct {
                            short   hour ;  /* Hour. */
                            short   minute ;/* Minute. */
                            short   second ;/* Second. */
                    } time ;
            } data ;
    } IODBTIMER ;
    

    Specify one of the following values in "buf.type". (It is impossible to get both date and time simultaneously.)

    buf.type
    (buf.nType)
    Data to be acquired
    0 Gets date
    1 Gets time

    The date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format is stored as follows.

    Member Setting data Range of value
    buf.data.date.year Year 1987 - 2085(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    1986 - 2086(Series 15)
    1995 - 2094(Series 15i)
    1997 - 2096(Series 30i/31i/32i, 0i-D/F, PMi-A)
    buf.data.date.month Month 1 - 12
    buf.data.date.date Date 1 - 31
    buf.data.time.hour Hour 0 - 23
    buf.data.time.minute Minute 0 - 59
    buf.data.time.second Second 0 - 59

    That is, the following data can be gotten from CNC.

    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    from "00:00:00, Jan. 1, 1987" to "23:59:59, Dec. 31, 2085"
    Series 15
    from "00:00:00, Jan. 1, 1986" to "23:59:59, Dec. 31, 2086"
    Series 15i
    from "00:00:00, Jan. 1, 1995" to "23:59:59, Dec. 31, 2094"
    Series 30i/31i/32i, 0i-D/F, PMi-A
    from "00:00:00, Jan. 1, 1997" to "23:59:59, Dec. 31, 2096"

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf out

    Pointer to the IODBTIMER structure including the date or time of CNC.

    The IODBTIMER structure is as follows.
    typedef struct iodbtimer {
            short   type ;          /* Spec. of date or time. */
            short   dummy ;         /* Not used. */
            union {
                    struct {
                            short   year ;  /* Year. */
                            short   month ; /* Month. */
                            short   date ;  /* Date. */
                    } date ;
                    struct {
                            short   hour ;  /* Hour. */
                            short   minute ;/* Minute. */
                            short   second ;/* Second. */
                    } time ;
            } data ;
    } IODBTIMER ;
    

    Specify one of the following values in "buf.type". (It is impossible to get both date and time simultaneously.)

    buf.type
    (buf.nType)
    Data to be acquired
    0 Gets date
    1 Gets time

    The date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format is stored as follows.

    Member Setting data Range of value
    buf.data.date.year Year 1997 - 2096
    buf.data.date.month Month 1 - 12
    buf.data.date.date Date 1 - 31
    buf.data.time.hour Hour 0 - 23
    buf.data.time.minute Minute 0 - 59
    buf.data.time.second Second 0 - 59


    ERRORS

    Code Description
    EW_NUMBER Incorrect spec. of date or time "buf.type".

    misc\cnc_modal

    Reads the modal information of CNC. Various information is stored in each member of ODBMDL.

    The readable modal data are modal G code or commanded data such as M,S,T,F.

    The union type which stores the data depends on the type of modal data (type). Therefore, in case of accessing data, use the union corresponding to the type.

    This function cannot be used for Series 15i, so use cnc_rdgcode function and cnc_rdcommand function instead of cnc_modal function.

    In Series 30i, 0i-D/F and PMi-A, the modal data that were assigned for Series 16i can be got by this function.
    As for the data that are added at Series 30i, 0i-D/F and PMi-A, please use cnc_rdgcode and cnc_rdcommand functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_modal(unsigned short FlibHndl, short type, short block, ODBMDL *modal);


    ARGUMENTS

    Name Direction Description
    FlibHndl in Specify the library handle. See "Library handle" for details.
    type in

    Type of data is stored. (refer to the following)

  • Series 15
  • -4 : Read all data of 1 shot G code at a time.
    -3 : Read all data concerning axis other than G code at a time.
    -2 : Read all data other than G code at a time.
    -1 : Read all data of G code at a time.
    0 to 17 : Read the data of G code one by one.
    100 to 126 : Read the data other than G code one by one.
    200 to 223 : Read the data concerning axis other than G code one by one.
    300 to 303 : 1 shot Read the data of G code one by one.

  • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i (In case of HSSB connection)
  • -4 : Read all data of 1 shot G code at a time.
    -3 : Read all data concerning axis other than G code at a time. (except 16i/18i-W)
    -2 : Read all data other than G code at a time.
    -1 : Read all data of G code at a time. (type = 1 to 20, 31 to 34 (Only Series 16L) )
    0 to 20,
    31 to 34 (Only Series 16L)
    : Read the data of G code one by one.
    100 to 126 : Read the data other than G code one by one.
    200 to 207 : Read the data concerning axis other than G code one by one.
    300 : Read the data of 1 shot G code one by one.

  • Series 16i/18i/21i, 0i-A/B/C, Power Mate i (In case of Ethernet connection)
  • -5 : Read all data of G code at a time. (type = 1 to 34)
    -4 : Read all data of 1 shot G code at a time.
    -3 : Read all data concerning axis other than G code at a time. (except 16i/18i-W)
    -2 : Read all data other than G code at a time.
    -1 : Read all data of G code at a time. (type = 1 to 20, 31 to 34 (Only Series 16L) )
    0 to 24,
    31 to 34 (Only Series 16L)
    : Read the data of G code one by one.
    100 to 126 : Read the data other than G code one by one.
    200 to 207 : Read the data concerning axis other than G code one by one.
    300 : Read the data of 1 shot G code one by one.

  • Series 30i, 0i-D/F, PMi-A
  • -4 : Read all data of 1 shot G code at a time.
    -3 : Read all data concerning axis other than G code at a time. (Only the axis number in a path is 8 axes or less.)
    -2 : Read all data other than G code at a time.
    -1 : Read all data of G code at a time. (type = 0 to 20)
    0 to 20 : Read the data of G code one by one.
    100 to 126 : Read the data other than G code one by one.
    200 to 207 : Read the data concerning axis other than G code one by one.
    300 : Read the data of 1 shot G code one by one.
    block in

    Assigned block in stored.

  • Series 15
  • 0 : previous block
    1 : active block
    2 : next block

  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  • 0 : active block
    1 : next block
    2 : block after next block (30i, 0i-D/F, PMi-A:unsupport)

  • Series 16i/18i-W
  • 0 : active block
    1 : next block
    2 : block after next block
    3 : previous block
    modal out

    Pointer to the ODBMDL structure including the modal data.

    The ODBMDL structure is as follows.
    typedef struct odbmdl {
         short datano;              /* Kind of modal data */
         short type;                /* Objective block */
         union {
              char  g_data;         /* Modal data of G code */
              char  g_rdata[35];    /* Modal data of G code */
              char  g_1shot[4];    /* Modal data of 1 shot G code*/
              struct {
                    long    aux_data;
                            /* Modal data other than G code */
                    char    flag1;          /* Flag 1 */
                    char    flag2;          /* Flag 2 */
              }aux;
              struct {
                    long    aux_data;
                            /* Modal data other than G code */
                    char    flag1;          /* Flag 1 */
                    char    flag2;          /* Flag 2 */
              }raux1[27];
              struct {
                    long    aux_data;
                            /* Modal data other than G code */
                    char    flag1;          /* Flag 1 */
                    char    flag2;          /* Flag 2 */
              }raux2[MAX_AXIS];
         }modal;    /* MAX_AXIS : max. controlled axes. */
    } ODBMDL ;
    
    datano
    Kind of modal data is stored.
    type
    Target block to be read is stored.
    g_data
    Use for an individual reading G code (and 1 shot G code). Modal G code in the corresponding G code group is stored.
    g_rdata
    Use for reading G code at a time. Modal G code in the all G code group is stored.
    g_1shot
    Use for reading 1 shot G code at a time. (In case of individual reading, use "g_data".)
    aux
    Use for an individual reading other than G code (include axis data).
    raux1
    Use for reading other than G code at a time.
    raux2
    Use for reading concerning axis other than G code at a time.
    aux_data
    Modal data other than G code is stored.
    flag1
    Supplementary information is stored.
    flag2
    Supplementary information is stored.

    (1) Reading modal G code.

    • Series 15 (only HSSB)
      Specify G code group number in following table for "type".
    • M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      0 0 G00 G00 G00 G00
      1 G01 G01 G01 G01
      2 G02 G02 G02 G02
      3 G03 G03 G03 G03
      4 G33 G32 G33 G33
      5 G34 G34 G34 G34
      6 G35 G35 G35 G35
      7 G36 G36 G36 G36
      8   G90 G77 G20
      9   G92 G78 G21
      10   G94 G79 G24
      11   G32.2 G32.2 G32.2
      12 G02.3   G02.3  
      13 G03.3   G03.3  
      14 G02.1      
      15 G03.1      
      16 G60      
      17 G02.2 G02.2 G02.2 G02.2
      18 G03.2 G03.2 G03.2 G03.2
      19 G06.1 G06.1 G06.1 G06.1
      20 G02.4      
      21 G03.4      
      22 G06.2 G06.2 G06.2 G06.2
      1 0 G17 G97 G97 G97
      1 G18 G96 G96 G96
      2 G19      
      3 G17.1      
      2 0 G91 G91 G91 G91
      1 G90 G90 G90 G90
      3 0 G22 G22 G22 G22
      1 G23 G23 G23 G23
      4 0 G94 G98 G94 G94
      1 G95 G99 G95 G95
      2 G93 G93 G93 G93
      5 0 G21 G21 G21 G71
      1 G20 G20 G20 G70
      6 0 G40 G40 G40 G40
      1 G41 G41 G41 G41
      2 G42 G42 G42 G42
      3 G40.3 G40.3 G40.3 G40.3
      4 G41.2      
      5 G42.2      
      6 G41.3      
      7 0 G49 G49 G49 G49
      1 G43 G43 G43 G43
      2 G44 G44 G44 G44
      3 G43.1 G43.1 G43.1 G43.1
      4 G43.2      
      5 G43.3      
      6 G43.4      
      8 0 G80 G80 G80 G80
      1 G81 G81 G81 G81
      2 G82 G82 G82 G82
      3 G83 G83 G83 G83
      4 G84 G84 G84 G84
      5 G85 G85 G85 G85
      6 G86 G86 G86 G86
      7 G87 G87 G87 G87
      8 G88 G88 G88 G88
      9 G89 G89 G89 G89
      10 G73 G83.1 G83.1 G83.1
      11 G74 G84.1 G84.1 G84.1
      12 G76 G86.1 G84.1 G84.1
      13 G81      
      14 G84.2 G84.2 G84.2 G84.2
      15 G84.3 G84.3 G84.3 G84.3
      16 G85   Multi axis only      
      17 G81.4 Multi axis only      
      18 G85.4 Multi axis only      
      9 0 G98 G98 G98 G98
      1 G99 G99 G99 G99
      2 G82      
      3 G83      
      4 G86 Multi axis only      
      5 G87 Multi axis only      
      10 0 G50 G50 G50 G50
      1 G51 G51 G51 G51
      11 0 G67 G67 G67 G67
      1 G66 G66 G66 G66
      2 G66.1 G66.1 G66.1 G66.1
      12 0 G97 G69 G69 G69
      1 G96 G68 G68 G68
      13 0 G54 G54 G54 G54
      1 G55 G55 G55 G55
      2 G56 G56 G56 G56
      3 G57 G57 G57 G57
      4 G58 G58 G58 G58
      5 G59 G59 G59 G59
      6 to 53 G54.1      
      14 0 G64 G64 G64 G64
      1 G61 G61 G61 G61
      2 G62 G62 G62 G62
      3 G63 G63 G63 G63
      4 G62.1 G62.1 G62.1 G62.1
      15 0 G69 G17 G17 G17
      1 G68 G18 G18 G18
      2   G19 G19 G19
      16 0 G15 G15 G15 G15
      1 G16 G16 G16 G16
      17 0 G50.1 G50.1 G50.1 G50.1
      1 G51.1 G51.1 G51.1 G51.1

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
      Specify G code group number in following table for "type". (M series includes Punch press, Power Mate i.)
    • M series T series Laser
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      G code
      0 0 G00 G00 G00 G00 G00
      1 G01 G01 G01 G01 G01
      2 G02 G02 G02 G02 G02
      3 G03 G03 G03 G03 G03
      4 G33 G32 G33 G33  
      5 G75 G90 G77 G20  
      6 G77 G92 G78 G21  
      7 G78 G94 G79 G24  
      8 G79        
      9   G34 G34 G34  
      10 G02.2        
      11 G03.2        
      12 G02.3        
      13 G03.3        
      14 G06.2 G35 G35 G35  
      15 G02.4 G36 G36 G36  
      16 G03.4        
      17   G06.2 G06.2 G06.2  
      18   G02.4 G02.4 G02.4  
      19   G03.4 G03.4 G03.4  
      20   G02.2 G02.2 G02.2 G12
      21   G03.2 G03.2 G03.2  
      22   G02.3 G02.3 G02.3  
      23   G03.3 G03.3 G03.3  
      24   G06.1 G06.1 G06.1  
      25   G32.2 G32.2 G32.2  
      1 0 G17 G97 G97 G97 G17
      1   G96 G96 G96  
      4 G19       G19
      8 G18       G18
      10 G17.1        
      2 0 G90   G90 G90 G90
      1 G91   G91 G91 G91
      3 0 G23 G69 G69 G69 G23
      1 G22 G68 G68 G68 G22
      4 0 G94 G98 G94 G94  
      1 G95 G99 G95 G95  
      2 G93 G93 G93 G93  
      5 0 G20 G20 G20 G70 G20
      1 G21 G21 G21 G71 G21
      6 0 G40 G40 G40 G40 G40
      1 G41 G41 G41 G41 G41
      2 G42 G42 G42 G42 G42
      3 G41.2 G41.2 G41.2 G41.2  
      4 G42.2 G42.2 G42.2 G42.2  
      5 G41.3 G41.3 G41.3 G41.3  
      6 G41.4 G41.4 G41.4 G41.4  
      7 G42.4 G42.4 G42.4 G42.4  
      8 G41.5 G41.5 G41.5 G41.5  
      9 G42.5 G42.5 G42.5 G42.5  
      10   G40.3 G40.3 G40.3  
      7 0 G49 G25 G25 G25 G49
      1 G43 G26 G26 G26 G43
      2 G44       G44
      3 G43.1        
      4 G43.4        
      5 G43.5        
      6 G43.2        
      7 G43.3        
      8 G43.6        
      8 0 G80 G23 G23 G23  
      1 G81 G22 G22 G22  
      2 G82        
      3 G83        
      4 G84        
      5 G85        
      6 G86        
      7 G87        
      8 G88        
      9 G89        
      10 G73        
      11 G74        
      12 G76        
      13 G84.2        
      14 G84.3        
      15 G81.2        
      9 0 G98 G80 G80 G80  
      1 G99 G83 G83 G83  
      2   G84 G84 G84  
      3   G85 G85 G85  
      4   G86 G86 G86  
      5   G87 G87 G87  
      6   G88 G88 G88  
      7   G89 G89 G89  
      10 0 G50   G98 G98 G50
      1 G51   G99 G99 G51
      11 0 G67 G67 G67 G67 G67
      1 G66 G66 G66 G66 G66
      2 G66.1 G66.1 G66.1 G66.1  
      12 0 G97 G49 G49 G49  
      1 G96 G43 G43 G43  
      13 0 G54(G54.1) G54 G54 G54 G54
      1 G55 G55 G55 G55 G55
      2 G56 G56 G56 G56 G56
      3 G57 G57 G57 G57 G57
      4 G58 G58 G58 G58 G58
      5 G59 G59 G59 G59 G59
      14 0 G64 G64 G64 G64 G64
      1 G61 G61 G61 G61 G61
      2 G62 G62 G62 G62 G62
      3 G63 G63 G63 G63  
      15 0 G69 G17 G17 G17 G85
      1 G68       G84
      2 G68.2        
      4   G18 G18 G18  
      8   G19 G19 G19  
      10   G17.1 G17.1 G17.1  
      16 0 G15 G69.1 G69.1 G69.1 G15
      1 G16 G68.1 G68.1 G68.1 G16
      2   G68.2 G68.2 G68.2  
      17 0 G40.1(G150)   G50 G50 G40.1
      1 G41.1(G151)   G51 G51 G41.1
      2 G42.1(G152)       G42.1
      18 0 G25        
      1 G26        
      19 0 G160 G50.2 G50.2 G50.2  
      1 G161 G51.2 G51.2 G51.2  
      20 0 G13.1(G113) G13.1 G13.1 G13.1 G13.1
      1 G12.1(G112) G12.1 G12.1 G12.1 G12.1
      21 0 G50.1 G50.1 G50.1 G50.1  
      1 G51.1 G51.1 G51.1 G51.1  
      22 0 G54.2 G49.1 G49.1 G49.1  
      2   G44 G44 G44  
      3   G43.1 G43.1 G43.1  
      4   G43.4 G43.4 G43.4  
      5   G43.5 G43.5 G43.5  
      23 0 G80.5 G15 G15 G15  
      1 G81.5 G16 G16 G16  
      31 0         G14
      1         G13
      32 0         G69
      1         G68
      33 0         G99
      1         G98
      34 0         G34
      1         G33

    • Series 30i, 0i-D/F, PMi-A
      Specify G code group number in following table for "type".
    • M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      0 0 G00 G00 G00 G00
      1 G01 G01 G01 G01
      2 G02 G02 G02 G02
      3 G03 G03 G03 G03
      4 G33 G32 G33 G33
      5 G75 G90 G77 G20
      6 G77 G92 G78 G21
      7 G78 G94 G79 G24
      8 G79      
      9   G34 G34 G34
      10 G02.2      
      11 G03.2      
      12 G02.3      
      13 G03.3      
      14 G06.2 G35 G35 G35
      15 G02.4 G36 G36 G36
      16 G03.4      
      17   G06.2 G06.2 G06.2
      18   G02.4 G02.4 G02.4
      19   G03.4 G03.4 G03.4
      20   G02.2 G02.2 G02.2
      21   G03.2 G03.2 G03.2
      22 G35 G02.3 G02.3 G02.3
      23 G36 G03.3 G03.3 G03.3
      24 G34 G06.1 G06.1 G06.1
      25   G32.2 G32.2 G32.2
      1 0 G17 G97 G97 G97
      1   G96 G96 G96
      4 G19      
      8 G18      
      10 G17.1      
      2 0 G90   G90 G90
      1 G91   G91 G91
      3 0 G23 G69 G69 G69
      1 G22 G68 G68 G68
      4 0 G94 G98 G94 G94
      1 G95 G99 G95 G95
      2 G93 G93 G93 G93
      3 G93.2 G93 G93 G93
      5 0 G20(G70) G20 G20 G70
      1 G21(G71) G21 G21 G71
      6 0 G40 G40 G40 G40
      1 G41 G41 G41 G41
      2 G42 G42 G42 G42
      3 G41.2 G41.2 G41.2 G41.2
      4 G42.2 G42.2 G42.2 G42.2
      5 G41.3 G41.3 G41.3 G41.3
      6 G41.4 G41.4 G41.4 G41.4
      7 G42.4 G42.4 G42.4 G42.4
      8 G41.5 G41.5 G41.5 G41.5
      9 G42.5 G42.5 G42.5 G42.5
      10 G41.6 G40.3 G40.3 G40.3
      11 G42.6 G41.6 G41.6 G41.6
      12   G42.6 G42.6 G42.6
      7 0 G49(G49.1) G25 G25 G25
      1 G43 G26 G26 G26
      2 G44      
      3 G43.1      
      4 G43.4      
      5 G43.5      
      6 G43.2      
      7 G43.3      
      8 0 G80 G23 G23 G23
      1 G81 G22 G22 G22
      2 G82      
      3 G83      
      4 G84      
      5 G85      
      6 G86      
      7 G87      
      8 G88      
      9 G89      
      10 G73      
      11 G74      
      12 G76      
      13 G84.2      
      14 G84.3      
      15 G81.2      
      9 0 G98 G80 G80 G80
      1 G99 G83 G83 G83
      2   G84 G84 G84
      3   G85 G85 G85
      4   G86 G86 G86
      5   G87 G87 G87
      6   G88 G88 G88
      7   G89 G89 G89
      10 0 G50   G98 G98
      1 G51   G99 G99
      11 0 G67 G67 G67 G67
      1 G66 G66 G66 G66
      2 G66.1 G66.1 G66.1 G66.1
      12 0 G97 G49 G49 G49
      1 G96 G43 G43 G43
      13 0 G54(G54.1) G54 G54 G54
      1 G55 G55 G55 G55
      2 G56 G56 G56 G56
      3 G57 G57 G57 G57
      4 G58 G58 G58 G58
      5 G59 G59 G59 G59
      14 0 G64 G64 G64 G64
      1 G61 G61 G61 G61
      2 G62 G62 G62 G62
      3 G63 G63 G63 G63
      15 0 G69 G17 G17 G17
      1 G68      
      2 G68.2      
      3 G68.3      
      4   G18 G18 G18
      8   G19 G19 G19
      10   G17.1 G17.1 G17.1
      16 0 G15 G69.1 G69.1 G69.1
      1 G16 G68.1 G68.1 G68.1
      2   G68.2 G68.2 G68.2
      17 0 G40.1(G150)   G50 G50
      1 G41.1(G151)   G51 G51
      2 G42.1(G152)      
      18 0 G25      
      1 G26      
      19 0 G160 G50.2 G50.2 G50.2
      1 G161 G51.2 G51.2 G51.2
      20 0 G13.1(G113) G13.1(G113) G13.1(G113) G13.1(G113)
      1 G12.1(G112) G12.1(G112) G12.1(G112) G12.1(G112)

    • Series 16i/18i-W
      Specify G code group number in following table for "type".
    • type g_data G code
      0 0 G00
      1 G01
      2 G02
      3 G03
      1 0 G17
      1 G18
      2 G19
      2 0 G90
      1 G91
      3 0 G23
      1 G22
      4 0 G94
      1 G95
      5 0 G20
      1 G21
      6 0 G40
      1 G41
      2 G42
      7 0 G50
      1 G51
      2 G52
      8 0 G60
      1 G61
      2 G62
      3 G63
      9 0 G49
      1 G48
      10 0 G66
      1 G67
      11 0 G47
      1 G46
      12 0 G68
      1 G69

    The numerical value of "g_data" mentioned in the above table is stored in the bit 0,..,bit 6 of "g_data" with binary format. Whether this G code is commanded in the target block specified by "block" or not is stored in the bit 7 of "g_data".

    For example, the following result is gotten by calling this function during executing N100's block of the next machining program. (for M of Series 16i/18i/21i, 0i-A/B/C, Power Mate i)

    N090 G18 ;
    N100 G1 Z100. ;
    N110 G17 G2 X10. Y-20. R12. ;
    
    type block g_data Modal status
    0 0 0x81 G1 is commanded.
    0 1 0x82 G2 is commanded.
    1 0 0x08 G18 mode. (not commanded)
    1 1 0x80 G17 is commanded.

    To read all "type" concerning G code at a time, -1 is specified. The array of g_data is stored in g_rdata.

    (2) Reading modal data other than G code.

    • Series 15
    • type Address
      100 B (2nd auxiliary function)
      101 D
      102 E
      103 F
      104 H
      105 L
      106 M
      107 S
      108 T
      109 R
      110 P
      111 Q
      112 A
      113 C
      114 I
      115 J
      116 K
      117 N
      118 O
      119 U
      120 V
      121 W
      122 X
      123 Y
      124 Z
      125 M (2nd M code)
      126 M (3rd M code)
      type Address
      200 1st axis
      201 2nd axis
        :     :
      209 10th axis
      210 11th axis
        :     :
      214 15th axis
      215 16th axis
        :     :
      222 23th axis
      223 24th axis
    • When MAX_AXIS=15, type=215,..,223 are not used.
    • When MAX_AXIS=10, type=210,..,223 are not used.
    • To read "type" concerning 100's at a time, -2 is specified. The data is stored in the user define type of ODBMDL4.
      To read "type" concerning 200's at a time, -3 is specified. The data is stored in the user define type of ODBMDL5.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • type Address
      100 B (2nd auxiliary function)
      101 D
      102 - (reserved)
      103 F
      104 H [M]
      105 L
      106 M
      107 S
      108 T
      109 R [M]
      110 P [M]
      111 Q [M]
      112 A
      113 C
      114 I
      115 J
      116 K
      117 N
      118 O
      119 U
      120 V
      121 W
      122 X
      123 Y
      124 Z
      125 M (2nd M code)
      126 M (3rd M code)
      type Address
      200 1st axis
      201 2nd axis
      202 3rd axis
      203 4th axis
      204 5th axis
      205 6th axis
      206 7th axis
      207 8th axis

    [M] is read as a modal data on M series and a commanded data on T series.

    To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1.

    To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.

    • The command of a decimal point in 'FLAG1' and the number of places of decimals in 'FLAG2' are valid in the case of 'F code'.
      And, when the command in the present block is '1', the command of a decimal point in 'FLAG1' is only effective.
      So, the number of places of decimal is always effective.
    • The number of input place of M,S,T,B is digits granted by NC parameter.
    • M code : parameter No.3030
      S code : parameter No.3031
      T code : parameter No.3032
      B code : parameter No.3033

    • Series 30i, 0i-D/F, PMi-A
    • type Address
      100 B (2nd auxiliary function)
      101 D
      102 - (reserved)
      103 F
      104 H [M]
      105 L
      106 M
      107 S
      108 T
      109 R [M]
      110 P [M]
      111 Q [M]
      112 A
      113 C
      114 I
      115 J
      116 K
      117 N
      118 O
      119 U
      120 V
      121 W
      122 X
      123 Y
      124 Z
      125 M (2nd M code)
      126 M (3rd M code)
      type Address
      200 1st axis
      201 2nd axis
      202 3rd axis
      203 4th axis
      204 5th axis
      205 6th axis
      206 7th axis
      207 8th axis

    [M] is read as a modal data on M series and a commanded data on T series.

    To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1.

    To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.

    • Sometimes the number of places of decimals is 'not zero' without the command of a decimal point.
    • The number of input place of M,S,T,B is digits granted by NC parameter.
    • M code : parameter No.3030
      S code : parameter No.3031
      T code : parameter No.3032
      B code : parameter No.3033

    • Series 16i/18i-W
    • type Address
      100 B
      101 D
      102 - (reserved)
      103 F
      104 H
      105 L
      106 M
      107 S
      108 T
      109 R
      110 P
      111 Q
      112 A
      113 C
      114 I
      115 J
      116 K
      117 N
      118 O
      119 U
      120 V
      121 W
      122 X
      123 Y
      124 Z

    To read "type" concerning 100's at a time, -2 is specified.

    The data is stored in the array of raux1.

    • The command of a decimal point in 'FLAG1' and the number of places of decimals in 'FLAG2' are valid in the case of 'F code'.
      And, when the command in the present block is '1', the command of a decimal point in 'FLAG1' is only effective.
      So, the number of places of decimal is always effective.

    (3) Read modal data of one shot G code

    • Series 15 (only HSSB)
    • M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      300 0 G04 G04 G04 G04
      1 G10 G10 G10 G10
      2 G10.1 G10.1 G10.1 G10.1
      3 G27 G27 G27 G27
      4 G28 G28 G28 G28
      5 G29 G29 G29 G29
      6 G30 G30 G30 G30
      7 G30.1 G30.1 G30.1 G30.1
      8 (*) G31
      (G31.1)
      G31
      (G31.1)
      G31
      (G31.1)
      G31
      (G31.1)
      9 G31.2 G31.2 G31.2 G31.2
      10 G31.3 G31.3 G31.3 G31.3
      11        
      12 (*) G37
      (G37.1)
      G37
      (G37.1)
      G37
      (G37.1)
      G37
      (G37.1)
      13   G37.2 G37.2 G37.2
      14   G37.3 G37.3 G37.3
      15 G39 G39 G39 G39
      16 G52 G52 G52 G52
      17 G60 G60 G60 G60
      18 G65 G65 G65 G65
      19 G92 G92 G92 G92
      20   G70 G70 G70
      21   G71 G71 G71
      22   G72 G72 G72
      23   G73 G73 G73
      24   G74 G74 G74
      25   G75 G75 G75
      26   G76 G76 G76
      27        
      28        
      29        
      30        
      31        
      32        
      33        
      34        
      35 G11 G11 G11 G11
      36 G07 G07 G07 G07
      37   G10.2 G10.2 G10.2
      38        
      39        
      40 G10.3 G10.3 G10.3 G10.3
      41 G11.3 G11.3 G11.3 G11.3
      42 G65.3 G65.3 G65.3 G65.3
      43        
      44 G05.1 G05.1 G05.1 G05.1
      45        
      46        
      47 G07.1 G07.1 G07.1 G07.1
      48        
      49        
      50 G81.1      
      51 G72.2      
      52 G10.6      
      53 G92.1 G50.3 G92.1 G92.1
      54 G72.2      
      55 G05.2      
      56 G12.2      
      57 G13.2      
      58   G10.7 G10.7 G10.7
      59        
      60        
      61        
      62        
      63        
      64        
      65        
      66        
      67 G31.9      
      68 G10.9      
      69        
      70        
      71        
      72        
      301 0 G09 G09 G09 G09
      1        
      2        
      302 0        
      1        
      2 G53 G53 G53 G53
      303 0 G38      
      1 G45      
      2 G46      
      3 G47      
      4 G48      
      (*) G31 and G31.1 are the same function.
      G37 and G37.1 are the same function.
    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • M series T series Laser
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      G code
      300 0 G04 G04 G04 G04 G04
      1 G10 G27 G27 G27 G10
      2   G28 G28 G28  
      3   G29 G29 G29  
      4 G27 G30 G30 G30 G27
      5 G28 G50 G92 G92 G28
      6 G29 G70 G70 G72 G29
      7 G30 G71 G71 G73 G30
      8 G38 G72 G72 G74  
      9 G39 G73 G73 G75  
      10 G45 G74 G74 G76 G45
      11 G46 G75 G75 G77 G46
      12 G47 G76 G76 G78 G47
      13 G48 G10 G10 G10 G48
      14 G92 G37.1 G37.1 G37.1 G92
      15 G09 G37 G37 G37 G09
      16 G31(G31.1) G31 G31 G31 G31
      17 G60 G65 G65 G65 G60
      18 G65       G65
      19   G05 G05 G05  
      20 G05 G11 G11 G11 G05
      21 G11 G07.1 G07.1 G07.1 G11
      22 G52 G52 G52 G52 G52
      23 G53 G53 G53 G53 G53
      24 G37 G30.1 G30.1 G30.1  
      25 G07.1(G107) G10.6 G10.6 G10.6 G07.1
      26 G30.1 G50.3 G92.1 G92.1 G30.1
      27 G10.6 G08 G08 G08  
      28 G72.1       G72.1
      29 G72.2 G39 G39 G39 G72.2
      30 G92.1 G60 G60 G60 G92.1
      31 G08       G08
      32         G71
      80         G24
      81         G32
      100 G81.1 G07 G07 G07  
      101   G09 G09 G09  
      102   G73.1 G73.1 G73.1  
      103   G73.2 G73.2 G73.2  
      104 G05.1 G74.1 G74.1 G74.1  
      105 G07        
      106 G31.8 G80.4 G80.4 G80.4  
      107 G31.9 G81.4 G81.4 G81.4  
      108 G12.4 G82.4 G82.4 G82.4  
      109 G13.4 G83.4 G83.4 G83.4  
      110 G05.4 G84.4 G84.4 G84.4  
      111 G10.9 G05.1 G05.1 G05.1  
      112 G31.2 G72.1 G72.1 G72.1  
      113 G31.3 G72.2 G72.2 G72.2  
      114 G31.4        
      115 G53.1        
      116   G38 G38 G38  
      117 G28.2        
      118 G30.2        
      126   G28.2 G28.2 G28.2  
      127   G30.2 G30.2 G30.2  
    • Series 30i, 0i-D/F, PMi-A
    • M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      300 0 G04 G04 G04 G04
      1 G10 G27 G27 G27
      2   G28 G28 G28
      3   G29 G29 G29
      4 G27 G30 G30 G30
      5 G28 G50 G92 G92
      6 G29 G70 G70 G72
      7 G30 G71 G71 G73
      8   G72 G72 G74
      9 G39 G73 G73 G75
      10   G74 G74 G76
      11   G75 G75 G77
      12   G76 G76 G78
      13   G10 G10 G10
      14 G92 G37.1 G37.1 G37.1
      15   G37(G37.2) G37(G37.2) G37(G37.2)
      16 G31(G31.1) G31 G31 G31
      17 G60 G65 G65 G65
      18 G65      
      19   G05 G05 G05
      20 G05 G11 G11 G11
      21 G11 G07.1(G107) G07.1(G107) G07.1(G107)
      22 G52 G52 G52 G52
      23   G53 G53 G53
      24 G37 G30.1 G30.1 G30.1
      25 G07.1(G107) G10.6 G10.6 G10.6
      26 G30.1 G50.3 G92.1 G92.1
      27 G10.6 G08 G08 G08
      28 G72.1 G100 G110 G101
      29 G72.2 G39 G39 G39
      30 G92.1 G60 G60 G60
      31 G08      
      96   G31.8 G31.8 G31.8
      97   G37.3 G37.3 G37.3
      99   G10.9 G10.9 G10.9
      100 G81.1 G07 G07 G07
      102   G73.1 G73.1 G73.1
      103   G73.2 G73.2 G73.2
      104 G05.1 G74.1 G74.1 G74.1
      105 G07 G05.4 G05.4 G05.4
      106 G31.8 G80.4 G80.4 G80.4
      107 G31.9 G81.4 G81.4 G81.4
      108 G12.4 G82.4 G82.4 G82.4
      109 G13.4 G83.4 G83.4 G83.4
      110 G05.4 G84.4 G84.4 G84.4
      111 G10.9 G05.1 G05.1 G05.1
      112 G31.2 G72.1 G72.1 G72.1
      113 G31.3 G72.2 G72.2 G72.2
      114 G31.4      
      116 G91.1      
      119   G43.6 G43.6 G43.6
      120   G50.4 G50.4 G50.4
      121   G50.5 G50.5 G50.5
      122   G50.6 G50.6 G50.6
      123   G51.4 G51.4 G51.4
      124   G51.5 G51.5 G51.5
      125 G37.1 G51.6 G91.1 G91.1
      126 G37.2      
      127 G37.3      
    • Series 16i/18i-W
    • type g_data G code
      300 0 G04
      1 G10
      2 G11
      3 G09
      4 G27
      5 G28
      6 G29
      7 G30
      13 G93
      14 G92
      15 G31
      16 G70
      17 G71
      18 G72
      19 G73
      20 G74
      21 G75
      22 G76
      23 G77
      24 G78
      25 G79
      26 G65
      27 G32
      28 G33
      31 G53
      32 G80
      33 G81
      34 G86
      35 G87
      36 G88
      37 G89

    The numerical value of "g_1shot" mentioned in the above table is stored in the bit 0,..,bit 6 of each array in "g_1shot" with binary format. Whether this G code is commanded in the objective block specified by "block" or not is stored in the bit 7 of "

    To read "type" concerning 1 shot G code at a time, -4 is specified.
    In case of Series 15, the data of type=300,..,303 is stored in g_1shot[0],..,g_1shot[3].
    In case of Series 16/18/21/0i, 30i, Power Mate i and PMi-A, the data of type=300 is stored in g_1shot[0].

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Type of data is stored. (refer to the following)

    -4 : Read all data of 1 shot G code at a time.
    -3 : Read all data concerning axis other than G code at a time.
    -2 : Read all data other than G code at a time.
    -1 : Read all data of G code at a time. (type = 0 to 20)
    0 to 20 : Read the data of G code one by one.
    100 to 126 : Read the data other than G code one by one.
    200 to 207 : Read the data concerning axis other than G code one by one.
    300 : Read the data of 1 shot G code one by one.
    block in

    Assigned block in stored.

    0 : active block
    1 : next block
    2 : block after next block

    modal out

    Pointer to the ODBMDL structure including the modal data.

    The ODBMDL structure is as follows.
    typedef struct odbmdl {
        short datano;              /* Kind of modal data */
        short type;                /* Objective block */
        union {
            char  g_data;         /* Modal data of G code */
            char  g_rdata[35];    /* Modal data of G code */
            char  g_1shot[4];     /* Modal data of 1 shot G code*/
            struct {
                long    aux_data;
                                /* Modal data other than G code */
                char    flag1;          /* Flag 1 */
                char    flag2;          /* Flag 2 */
            }aux;
            struct {
                long    aux_data;
                                /* Modal data other than G code */
                char    flag1;          /* Flag 1 */
                char    flag2;          /* Flag 2 */
            }raux1[27];
            struct {
                long    aux_data;
                                /* Modal data other than G code */
                char    flag1;          /* Flag 1 */
                char    flag2;          /* Flag 2 */
            }raux2[MAX_AXIS];             /* MAX_AXIS : max. controlled axes. */
        }modal;    
    } ODBMDL ;
    
    datano
    Kind of modal data is stored.
    type
    Target block to be read is stored.
    g_data
    Use for an individual reading G code (and 1 shot G code). Modal G code in the corresponding G code group is stored.
    g_rdata
    Use for reading G code at a time. Modal G code in the all G code group is stored.
    g_1shot
    Use for reading 1 shot G code at a time. (In case of individual reading, use "g_data".)
    aux
    Use for an individual reading other than G code (include axis data).
    raux1
    Use for reading other than G code at a time.
    raux2
    Use for reading concerning axis other than G code at a time.
    aux_data
    Modal data other than G code is stored.
    flag1
    Supplementary information is stored.
    flag2
    Supplementary information is stored.

    (1) Reading modal G code.


    • Specify G code group number in following table for "type".
    • M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      0 0 G00 G00 G00 G00
      1 G01 G01 G01 G01
      2 G02 G02 G02 G02
      3 G03 G03 G03 G03
      4 G33 G32 G33 G33
      5 G75 G90 G77 G20
      6 G77 G92 G78 G21
      7 G78 G94 G79 G24
      9 G79 G34 G34 G34
      10 G02.2      
      11 G03.2      
      12 G02.3      
      13 G03.3      
      14 G06.2 G35 G35 G35
      15 G02.4 G36 G36 G36
      16 G03.4      
      17   G06.2 G06.2 G06.2
      18   G02.4 G02.4 G02.4
      19   G03.4 G03.4 G03.4
      20   G02.2 G02.2 G02.2
      21   G03.2 G03.2 G03.2
      22 G35 G02.3 G02.3 G02.3
      23 G36 G03.3 G03.3 G03.3
      24 G34 G06.1 G06.1 G06.1
      25   G32.2 G32.2 G32.2
      1 0 G17 G97 G97 G97
      1   G96 G96 G96
      4 G19      
      8 G18      
      10 G17.1      
      2 0 G90   G90 G90
      1 G91   G91 G91
      3 0 G23 G69 G69 G69
      1 G22 G68 G68 G68
      4 0 G94 G98 G94 G94
      1 G95 G99 G95 G95
      2 G93 G93 G93 G93
      3 G93.2 G93 G93 G93
      5 0 G20(G70) G20 G20 G70
      1 G21(G71) G21 G21 G71
      6 0 G40 G40 G40 G40
      1 G41 G41 G41 G41
      2 G42 G42 G42 G42
      3 G41.2 G41.2 G41.2 G41.2
      4 G42.2 G42.2 G42.2 G42.2
      5 G41.3 G41.3 G41.3 G41.3
      6 G41.4 G41.4 G41.4 G41.4
      7 G42.4 G42.4 G42.4 G42.4
      8 G41.5 G41.5 G41.5 G41.5
      9 G42.5 G42.5 G42.5 G42.5
      10   G40.3 G40.3 G40.3
      7 0 G49(G49.1) G25 G25 G25
      1 G43 G26 G26 G26
      2 G44      
      3 G43.1      
      4 G43.4      
      5 G43.5      
      6 G43.2      
      7 G43.3      
      8 0 G80 G23 G23 G23
      1 G81 G22 G22 G22
      2 G82      
      3 G83      
      4 G84      
      5 G85      
      6 G86      
      7 G87      
      8 G88      
      9 G89      
      10 G73      
      11 G74      
      12 G76      
      13 G84.2      
      14 G84.3      
      15 G81.2      
      9 0 G98 G80 G80 G80
      1 G99 G83 G83 G83
      2   G84 G84 G84
      3   G85 G85 G85
      4   G86 G86 G86
      5   G87 G87 G87
      6   G88 G88 G88
      7   G89 G89 G89
      10 0 G50   G98 G98
      1 G51   G99 G99
      11 0 G67 G67 G67 G67
      1 G66 G66 G66 G66
      2 G66.1 G66.1 G66.1 G66.1
      12 0 G97 G49 G49 G49
      1 G96 G43 G43 G43
      13 0 G54(G54.1) G54 G54 G54
      1 G55 G55 G55 G55
      2 G56 G56 G56 G56
      3 G57 G57 G57 G57
      4 G58 G58 G58 G58
      5 G59 G59 G59 G59
      14 0 G64 G64 G64 G64
      1 G61 G61 G61 G61
      2 G62 G62 G62 G62
      3 G63 G63 G63 G63
      15 0 G69 G17 G17 G17
      1 G68      
      2 G68.2      
      4   G18 G18 G18
      8   G19 G19 G19
      10   G17.1 G17.1 G17.1
      16 0 G15 G69.1 G69.1 G69.1
      1 G16 G68.1 G68.1 G68.1
      2   G68.2 G68.2 G68.2
      17 0 G40.1(G150)   G50 G50
      1 G41.1(G151)   G51 G51
      2 G42.1(G152)      
      18 0 G25      
      1 G26      
      19 0 G160 G50.2 G50.2 G50.2
      1 G161 G51.2 G51.2 G51.2
      20 0 G13.1(G113) G13.1 G13.1 G13.1
      1 G12.1(G112) G12.1 G12.1 G12.1

    The numerical value of "g_data" mentioned in the above table is stored in the bit 0,..,bit 6 of "g_data" with binary format. Whether this G code is commanded in the target block specified by "block" or not is stored in the bit 7 of "g_data".

    For example, the following result is gotten by calling this function during executing N100's block of the next machining program. (for M of Series 30is)

    N090 G18 ;
    N100 G1 Z100. ;
    N110 G17 G2 X10. Y-20. R12. ;
    
    type block g_data Modal status
    0 0 0x81 G1 is commanded.
    0 1 0x82 G2 is commanded.
    1 0 0x08 G18 mode. (not commanded)
    1 1 0x80 G17 is commanded.

    To read all "type" concerning G code at a time, -1 is specified.
    The array of g_data is stored in g_rdata.

    (2) Reading modal data other than G code.

      type Address
      100 B (2nd auxiliary function)
      101 D
      102 - (reserved)
      103 F
      104 H [M]
      105 L
      106 M
      107 S
      108 T
      109 R [M]
      110 P [M]
      111 Q [M]
      112 A
      113 C
      114 I
      115 J
      116 K
      117 N
      118 O
      119 U
      120 V
      121 W
      122 X
      123 Y
      124 Z
      125 M (2nd M code)
      126 M (3rd M code)
      type Address
      200 1st axis
      201 2nd axis
      202 3rd axis
      203 4th axis
      204 5th axis
      205 6th axis
      206 7th axis
      207 8th axis

    [M] is read as a modal data on M series and a commanded data on T series.

    To read "type" concerning 100's at a time, -2 is specified. The data is stored in the array of raux1.

    To read "type" concerning 200's at a time, -3 is specified. The data is stored in the array of raux2.

    • Sometimes the number of places of decimals is 'not zero' without the command of a decimal point.
    • The number of input place of M,S,T,B is digits granted by NC parameter.
    • M code : parameter No.3030
      S code : parameter No.3031
      T code : parameter No.3032
      B code : parameter No.3033

    (3) Read modal data of one shot G code

      M series T series
      type g_data G code G code
      System A
      G code
      System B
      G code
      System C
      300 0 G04 G04 G04 G04
      1 G10 G27 G27 G27
      2   G28 G28 G28
      3   G29 G29 G29
      4 G27 G30 G30 G30
      5 G28 G50 G92 G92
      6 G29 G70 G70 G72
      7 G30 G71 G71 G73
      8 G38 G72 G72 G74
      9 G39 G73 G73 G75
      10   G74 G74 G76
      11   G75 G75 G77
      12   G76 G76 G78
      13   G10 G10 G10
      14 G92 G37.1 G37.1 G37.1
      15   G37 G37 G37
      16 G31(G31.1) G31 G31 G31
      17 G60 G65 G65 G65
      18 G65      
      19   G05 G05 G05
      20 G05 G11 G11 G11
      21 G11 G07.1 G07.1 G07.1
      22 G52 G52 G52 G52
      23 G53 G53 G53 G53
      24 G37 G30.1 G30.1 G30.1
      25 G07.1(G107) G10.6 G10.6 G10.6
      26 G30.1 G50.3 G92.1 G92.1
      27 G10.6 G08 G08 G08
      28 G72.1      
      29 G72.2 G39 G39 G39
      30 G92.1 G60 G60 G60
      31 G08      
      32        
      80        
      81        
      100 G81.1 G07 G07 G07
      101   G09 G09 G09
      102   G73.1 G73.1 G73.1
      103   G73.2 G73.2 G73.2
      104 G05.1 G74.1 G74.1 G74.1
      105 G07      
      106 G31.8 G80.4 G80.4 G80.4
      107 G31.9 G81.4 G81.4 G81.4
      108 G12.4 G82.4 G82.4 G82.4
      109 G13.4 G83.4 G83.4 G83.4
      110 G05.4 G84.4 G84.4 G84.4
      111 G10.9 G05.1 G05.1 G05.1
      112 G31.2 G72.1 G72.1 G72.1
      113 G31.3 G72.2 G72.2 G72.2
      114 G31.4 G53.1 G53.1 G53.1
      116 G91.1 G38 G38 G38
      119   G43.6 G43.6 G43.6
      120   G50.4 G50.4 G50.4
      121   G50.5 G50.5 G50.5
      122   G50.6 G50.6 G50.6
      123   G51.4 G51.4 G51.4
      124   G51.5 G51.5 G51.5
      125   G51.6 G91.1 G91.1
      126   G28.2 G28.2 G28.2
      127   G30.2 G30.2 G30.2

    The numerical value of "g_1shot" mentioned in the above table is stored in the bit 0,..,bit 6 of each array in "g_1shot" with binary format. Whether this G code is commanded in the objective block specified by "block" or not is stored in the bit 7 of "

    To read "type" concerning 1 shot G code at a time, -4 is specified.
    The data of type=300 is stored in g_1shot[0].


    ERRORS

    Code Description
    EW_NUMBER Data number error
    The specification of modal data (type) is wrong.
    EW_ATTRIB Data attribute error
    The specification of block (block)is wrong.

    misc\cnc_rd3dcdcnv

    Reads the mode and data of the 3-dimensional coordinate conversion.

      These are stored in each member of ODB3DCD structure.

    The places of decimal points can be got by cnc_getfigure function.

    The unit of angle follows CNC parameter 6400#2.

    6400#2=0 : 0.00001 deg (1/100,000)
    6400#2=1 : 0.001 deg


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dcdcnv(unsigned short FlibHndl, ODB3DCD *cdcnv);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    cdcnv out

    Pointer to the ODB3DCD structure for the data of the 3-dimensional coordinate conversion.

    typedef struct odb3dcd {
        short   mode;         /* 3-D coordinate conversion mode  */
        short   dno;          /* number of 3-D coordinate conv.  */
        short   cd_axes[3];   /* axis of 3-D coordinate conv.    */
        long    center[2][3]; /* center of rotation              */
        long    direct[2][3]; /* direction of center             */
        long    angle[2];     /* rotation angle                  */
    } ODB3DCD ;
    
    mode
    Mode of the 3-dimensional coordinate conversion is set.
    0 : cancel mode
    1 : conversion mode
    * In case of '0', the data except 'mode' is invalid.
    dno
    Number of 3-D coordinate conversion is set. Valid number is 1 or 2.
    cd_axes
    Axis number of 3-D coordinate conversion is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    cd_axes[0] : 1st axis number
    cd_axes[1] : 2nd axis number
    cd_axes[2] : 3rd axis number
    center
    Absolute position of center of rotation is set.
    center[0][0] to center[0][2] : 1st time
    center[1][0] to center[1][2] : 2nd time
    In case of dno=1, center[1][0],..,center[1][2] are not used.
    direct
    Direction of center is set.
    direct[0][0] to direct[0][2] : 1st time
    direct[1][0] to direct[1][2] : 2nd time
    In case of nDno=1, lDirect(1,0),..,lDirect(1,2) are not used.
    angle
    Rotation angle of coordinate rotation is set.
    angle[0] : 1st time
    angle[1] : 2nd time
    In case of dno=1, angle[1] is not used.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15T/15TT.
    EW_NOOPT No option
    The 3-dimensional coordinate system conversion option and the extended driver/library function are necessary.

    misc\cnc_rd3dtofs

    Reads the mode and vector of the 3-dimensional tool compensation.

    These are stored in each member of ODB3DTO structure.

    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dtofs(unsigned short FlibHndl, ODB3DTO *tofs3d);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tofs3d out

    Pointer to the ODB3DTO structure for the data of the 3-dimensional tool compensation.

    typedef struct odb3dto {
        short   mode;         /* offset mode                   */
        short   ofs_axes[3];  /* axis of 3-D tool compensation */
        long    ofsvct[3];    /* offset vector                 */
    } ODB3DTO ;
    
    mode
    Mode of the 3-dimensional tool compensation is set.
    0 : cancel mode
    1 : offset mode
    * In case of '0', the data except 'mode' is invalid.
    center
    Axis number of 3-D tool compensation is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    ofs_axes[0] : 1st axis number
    ofs_axes[1] : 2nd axis number
    ofs_axes[2] : 3rd axis number
    ofsvct
    Vector of the 3-dimensional tool compensation is set.
    ofsvct[0] : 1st axis number
    ofsvct[1] : 2nd axis number
    ofsvct[2] : 3rd axis number

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15T/15TT.
    EW_NOOPT No option
    The 3-dimensional cutter compensation option and the extended driver/library function are necessary.

    misc\cnc_rdalminfo

    Reads the detailed information of currently arising CNC alarms.

    Various information is stored in "data" of ALMINFO.

    This function is used for displaying the alarm numbers or messages of the currently arising alarms by the application program, etc.

    When CNC falls into the system alarm, it is completely impossible to communicate data between MMC and CNC, and the alarm information cannot be acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalminfo(unsigned short FlibHndl, short type, short alm_type, short length, ALMINFO *alarminfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of output format.
    0 : Alarm information 1 (without message)
    1 : Alarm information 2 (with message)
    alm_type in Specify the type of alarm.

    • Series 15/15i
    • 0 : Background P/S (BG)
      1 : Foreground P/S (PS)
      2 : Overheat alarm (only Series 15) (OH)
      3 : Sub-CPU error (only Series 15) (SB)
      4 : Syncronized error (SN)
      5 : Parameter switch on (SW)
      6 : Overtravel,External data (OT)
      7 : PMC error (PC)
      8 : External alarm message (EX)
      9 : (Not used)
      10 : Serious P/S (SR)
      11 : (Not used)
      12 : Servo alarm (SV)
      13 : I/O error (IO)
      14 : Power off parameter set (PW)
      15 : (Not used)
      16 : External alarm message (2) (only Series 15i) (EX)
      17 : External alarm message (3) (only Series 15i) (EX)
      18 : External alarm message (4) (only Series 15i) (EX)
      19 : Macro alarm (only Series 15i) (MC)
      20 : Spindle alarm (only Series 15i) (SP)
    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • 0 : P/S100
      1 : P/S000
      2 : P/S101
      3 : P/S alarm except above
      4 : Overtravel alarm
      5 : Overheat alarm
      6 : Servo alarm
      7 : (Not used)
      8 : APC alarm
      9 : Spindle alarm
      10 : P/S alarm(No.5000,..), Punchpress alarm
      11 : Laser alarm
      12 : (Not used)
      13 : Rigid tap alarm
      14 : (Not used)
      15 : External alarm message
    • Series 16i/18i-W
    • 0 : P/S alarm
      1 : Overtravel alarm
      2 : Servo alarm
      3 : (Not used)
      4 : Overtravel alarm
      5 : Stroke limit - 1
      6 : Stroke limit - 2
      7 : Edit alarm
      8 : APC alarm
      9 : (Not used)
      10 : P/S 5000 ... alarm
      11 : (Not used)
      12 : (Not used)
      13 : (Not used)
      14 : External alarm message
      15 : Reverse control alarm
    • Series 30i, 0i-D/F, PMi-A
    • 0 : Parameter switch on (SW)
      1 : Power off parameter set (PW)
      2 : I/O error (IO)
      3 : Foreground P/S (PS)
      4 : Overtravel,External data (OT)
      5 : Overheat alarm (OH)
      6 : Servo alarm (SV)
      7 : Data I/O error (SR)
      8 : Macro alarm (MC)
      9 : Spindle alarm (SP)
      10 : Other alarm(DS) (DS)
      11 : Alarm concerning Malfunction prevent functions (IE)
      12 : Background P/S (BG)
      13 : Syncronized error (SN)
      14 : (reserved)
      15 : External alarm message (EX)
      16 : (reserved)
      17 : (reserved)
      18 : (reserved)
      19 : PMC error (PC)
    length in Specify the length of the data block(size of ALMINFO user define type)

    • Series 15/15i:maximum axis<=15 or Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i

    • N is the number of messages to be read.


    • Series 15/15i:maximum axis=24
    • Series 30i, 0i-D/F, PMi-A:

    • N is the number of messages to be read.
    alarminfo out Pointer to the ALMINFO structure including the alarm information.

    The ALMINFO structure is as follows.


    typedef struct alminfo {
    #if MAX_AXIS > 16  /* Series 15/15i : maximum axis=24 */
                       /* Series 30i, 0i-D/F, PMi-A */
         union {
            struct {
                struct {
                    long  axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                } alm[N] ;
                long data_end ;             /* data end */
            } alm1 ;
            struct {
                struct {
                    long  axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                    short msg_len ;         /* Message length */
                    char alm_msg[32] ;      /* Alarm message */
                } alm[N] ;
                long data_end ;             /* data end */
            }alm2 ;
        } u ;
    #else
         union {
            struct {
                struct {
                    short axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                } alm[N] ;
                short data_end ;            /* data end */
            } alm1 ;
            struct {
                struct {
                    short axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                    short msg_len ;         /* Message length */
                    char alm_msg[32] ;      /* Alarm message */
                } alm[N] ;
                short data_end ;            /* data end */
            }alm2 ;
        } u ;
    #endif
    } ALMINFO ;     /*  N : number of messages to be read. */
    
    axis
    Axis information is stored.
    The generation of the alarm of each axis is shown with ON/OFF of bit.
    As for the none axis-type alarm, all bits are set 0.
    When this data is '-1', the data end is shown.

    • Series 15/15i:maximum axis<=15 or Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • #15 : Always 0
      #14 : The 15th axis alarm
      #13 : The 14th axis alarm
           :
      #01 : The 2nd axis alarm
      #00 : The 1st axis alarm
    • Series 15/15i:maximum axis=24
    • #24,..,31 : Always 0
      #23 : The 24th axis alarm
      #22 : The 23th axis alarm
           :
      #01 : The 2nd axis alarm
      #00 : The 1st axis alarm
    • Series 30i, 0i-D/F, PMi-A
    • #31 : The 32th axis alarm
      #30 : The 31th axis alarm
           :
      #01 : The 2nd axis alarm
      #00 : The 1st axis alarm
    alarm_no
    Alarm number (binary) is stored.
    For Series 15/15i, The first 2 bits(#15,#14) is as follows.
    #15 : Macro alarm
    #14 : alarm for path 2 of TT system
    (Alarm number can be acquired by masking these bits.)
    msg_len
    Message length(binary) is stored. (1 to 32)
    alm_msg
    Alarm message character string is stored.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
    Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    data_end
    (unused)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the type of output format.

    0 : Alarm information 1 (without message)
    1 : Alarm information 2 (with message)
    alm_type in

    Specify the type of alarm.

    0 : Parameter switch on (SW)
    1 : Power off parameter set (PW)
    2 : I/O error (IO)
    3 : Foreground P/S (PS)
    4 : Overtravel,External data (OT)
    5 : Overheat alarm (OH)
    6 : Servo alarm (SV)
    7 : Data I/O error (SR)
    8 : Macro alarm (MC)
    9 : Spindle alarm (SP)
    10 : Other alarm(DS) (DS)
    11 : Alarm concerning Malfunction prevent functions (IE)
    12 : Background P/S (BG)
    13 : Syncronized error (SN)
    14 : (reserved)
    15 : External alarm message (EX)
    16 : (reserved)
    17 : (reserved)
    18 : (reserved)
    19 : PMC error (PC)
    length in

    Specify the length of the data block(size of ALMINFO user define type)


    N is the number of messages to be read.
    alarminfo out Pointer to the ALMINFO structure including the alarm information.

    The ALMINFO structure is as follows.

    typedef struct alminfo {
         union {
            struct {
                struct {
                    long  axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                } alm[N] ;
                long data_end ;             /* data end */
            } alm1 ;
            struct {
                struct {
                    long  axis ;            /* Axis information */
                    short alm_no ;          /* Alarm number */
                    short msg_len ;         /* Message length */
                    char alm_msg[32] ;      /* Alarm message */
                } alm[N] ;
                long data_end ;             /* data end */
            }alm2 ;
        } u ;
    } ALMINFO ;     /*  N : number of messages to be read. */
    
    axis
    Axis information is stored.
    The generation of the alarm of each axis is shown with ON/OFF of bit.
    As for the none axis-type alarm, all bits are set 0.
    When this data is '-1', the data end is shown.

      #31 : The 32th axis alarm
      #30 : The 31th axis alarm
           :
      #01 : The 2nd axis alarm
      #00 : The 1st axis alarm
    alarm_no
    Alarm number (binary) is stored.
    msg_len
    Message length(binary) is stored. (1 to 32)
    alm_msg
    Alarm message character string is stored.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    data_end
    (unused)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ALMINFO structure (length) is wrong.
    EW_NUMBER Data number error
    The type of output format (type) is wrong.
    EW_ATTRIB Data attribute error
    The specification of alarm type (alm_type) is wrong.

    misc\cnc_rdalmmsg

    Reads the currently arising CNC alarm messages. All alarm messages can be read at once.

    Differing from cnc_rdalminfo fucntion, the axis name is inserted in the axis-type alarm message.

    The number of characters which can be acquired in this function is up to 32 characters. So, Plese use cnc_rdalmmsg2 fucntion for Series 30i/31i/32i, 0i-D/F and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmmsg(unsigned short FlibHndl, short type, short *num, ODBALMMSG *almmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of alarm.

    • Series 15i (only Ethernet)
    • 0 : Background P/S (BG)
      1 : Foreground P/S (PS)
      2 : Overheat alarm (OH)
      3 : Sub-CPU error (SB)
      4 : Syncronized error (SN)
      5 : Parameter switch on (SW)
      6 : Overtravel,External data (OT)
      7 : PMC error (PC)
      8 : External alarm message (1) (EX)
      9 : (Not used)
      10 : Serious P/S (SR)
      11 : (Not used)
      12 : Servo alarm (SV)
      13 : I/O error (IO)
      14 : Power off parameter set (PW)
      15 : (Not used)
      16 : External alarm message (2) (EX)
      17 : External alarm message (3) (EX)
      18 : External alarm message (4) (EX)
      19 : Macro alarm (MC)
      20 : Spindle alarm (SP)
      -1 : all type
    • Series 16i/18i/21i, 0i-A/B/C, Power Mate i (only Ethernet)
    • 0 : P/S100
      1 : P/S000
      2 : P/S101
      3 : P/S alarm except above
      4 : Overtravel alarm
      5 : Overheat alarm
      6 : Servo alarm
      7 : (Not used)
      8 : APC alarm
      9 : Spindle alarm
      10 : P/S alarm(No.5000,..), Punchpress alarm
      11 : Laser alarm
      12 : (Not used)
      13 : Rigid tap alarm
      14 : (Not used)
      15 : External alarm message
      -1 : all type
    • Series 30i, 0i-D/F, PMi-A
    • 0 : Parameter switch on (SW)
      1 : Power off parameter set (PW)
      2 : I/O error (IO)
      3 : Foreground P/S (PS)
      4 : Overtravel,External data (OT)
      5 : Overheat alarm (OH)
      6 : Servo alarm (SV)
      7 : Data I/O error (SR)
      8 : Macro alarm (MC)
      9 : Spindle alarm (SP)
      10 : Other alarm(DS) (DS)
      11 : Alarm concerning Malfunction prevent functions (IE)
      12 : Background P/S (BG)
      13 : Syncronized error (SN)
      14 : (reserved)
      15 : External alarm message (EX)
      16 : (reserved)
      17 : (reserved)
      18 : (reserved)
      19 : PMC error (PC)
      -1 : all type
    num in/out Pointer to the number of alarm messages to be read. Specify the number of alarm messages to be read before function call and actual number of data being read is stored after the function call.
    almmsg out Specify the pointer to the array of ODBALMMSG structure to store the alarm messages. The number of array must be equal to "*num".

    The ODBALMMSG structure is as follows.

    typedef struct odbalmmsg {
            long alm_no ;           /* alarm number */
            short type ;            /* alarm type */
            short axis ;            /* axis number */
            short dummy ;           /* reserved */
            short msg_len ;         /* message length */
            char alm_msg[32];       /* alarm message */
    } ODBALMMSG;
    
    alm_no
    Alarm number is stored.
    type
    Alarm type is stored. The value is same as one which is specified as the parameter type.
    axis
    Axis number is stored. (1 to maximum controlled axes number)
    As for the none axis-type alarm, it is 0.
    msg_len
    Message length(binary) is stored. (1 to 32)
    alm_msg
    Alarm message character string is stored.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
    Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    Note3) Refer to "APPENDIX I Central & East European Character Code", "APPENDIX J West European Character Code List" of "C Language Executor PROGRAMMING MANUAL" for Western Europe code.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The alarm message number (*num) is 0 or less.
    EW_ATTRIB Data attribute error
    The specification of alarm type (type) is wrong.

    misc\cnc_rdalmmsg2

    Reads the currently arising CNC alarm messages. All alarm messages can be read at once.

    Differing from cnc_rdalminfo fucntion, the axis name is inserted in the axis-type alarm message.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdalmmsg2(unsigned short FlibHndl, short type, short *num, ODBALMMSG2 *almmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of alarm.

      0 : Parameter switch on (SW)
      1 : Power off parameter set (PW)
      2 : I/O error (IO)
      3 : Foreground P/S (PS)
      4 : Overtravel,External data (OT)
      5 : Overheat alarm (OH)
      6 : Servo alarm (SV)
      7 : Data I/O error (SR)
      8 : Macro alarm (MC)
      9 : Spindle alarm (SP)
      10 : Other alarm(DS) (DS)
      11 : Alarm concerning Malfunction prevent functions (IE)
      12 : Background P/S (BG)
      13 : Syncronized error (SN)
      14 : (reserved)
      15 : External alarm message (EX)
      16 : (reserved)
      17 : (reserved)
      18 : (reserved)
      19 : PMC error (PC)
      20-31 : (not used)
      -1 : All type
    num in/out Pointer to the number of alarm messages to be read. Specify the number of alarm messages to be read before function call and actual number of data being read is stored after the function call.
    almmsg out Specify the pointer to the array of ODBALMMSG2 structure to store the alarm messages. The number of array must be equal to "*num".

    The ODBALMMSG2 structure is as follows.

    typedef struct odbalmmsg2 {
            long alm_no ;           /* alarm number */
            short type ;            /* alarm type */
            short axis ;            /* axis number */
            short dummy ;           /* reserved */
            short msg_len ;         /* message length */
            char alm_msg[64];       /* alarm message */
    } ODBALMMSG2;
    
    alm_no
    Alarm number is stored.
    type
    Alarm type is stored. The value is same as one which is specified as the parameter type.
    axis
    Axis number is stored. (1 to maximum controlled axes number)
    As for the none axis-type alarm, it is 0.
    msg_len
    Message length(binary) is stored. (1 to 64)
    alm_msg
    Alarm message character string is stored.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    Note2) Refer to "APPENDIX I Central & East European Character Code", "APPENDIX J West European Character Code List" of "C Language Executor PROGRAMMING MANUAL" for Western Europe code.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The alarm message number (*num) is 0 or less.
    EW_ATTRIB Data attribute error
    The specification of alarm type (type) is wrong.

    misc\cnc_rdbrstrinfo

    Reads the data of block restart.

    These are stored in each member of ODBBRS structure.

    The destination and the distance to go of block restart are valid in case of CNC parameter 2204#1=1, 7613#0=1 for Series 15.

    The places of decimal points can be got by cnc_getfigure function.

    The relation to these data, amount of Tool Length Compensation/Cutter Compensation, and amount of servo delay and acceleration/deceleration delay follows the setting of CNC parameter of the following description.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdbrstrinfo(unsigned short FlibHndl, ODBBRS *brstr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    brstr out

    Pointer to the ODBBRS structure for the data of block restart. The ODBBRS structure is as follows.

    typedef struct odbbrs {
         long    dest[MAX_AXIS];    /* destination    */
         long    dist[MAX_AXIS];    /* distance to go */
    } ODBBRS ;     /* MAX_AXIS : max. controlled axes */
    
    dest
    The destination of block restart is set. The data of current controlled axis is valid.
    dist
    The distance to go of block restart is set. The data of current controlled axis is valid.

    ERRORS

    Code Description
    EW_NOOPT No option
    The block restart option and the extended driver/library function are necessary.

    misc\cnc_rdcdrotate

    Reads the mode and data of the coordinate rotation.

    These are stored in each member of ODBROT structure.

    The places of decimal points can be got by cnc_getfigure function.

    The unit of angle follows CNC parameter 6400#2.

    6400#2=0 : 0.00001 deg (1/100,000)
    6400#2=1 : 0.001 deg


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcdrotate(unsigned short FlibHndl, ODBROT *cdrot);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    cdrot out

    Pointer to the ODBROT structure for the data of the coordinate rotation. The ODBROT structure is as follows.

    typedef struct odbrot {
        short   mode;         /* coordinate rotation mode */
        short   pln_axes[2];  /* axis of plane selection  */
        long    center[2];    /* rotation center          */
        long    angle;        /* rotation angle           */
    } ODBROT ;
    
    mode
    Mode of the coordinate rotation is set.
    0 : cancel mode
    1 : coordinate rotation mode
    * In case of '0', the data except 'mode' is invalid.
    pln_axes
    Axis number of plane selection is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    pln_axes[0] : 1st axis number
    pln_axes[1] : 2nd axis number
    center
    Absolute position of rotation center is set.
    angle
    Coordinate rotation angle is set.

    'center' according to the G code of plane selection is as follows.

    center[0] center[1]
    G17 X axis or parallel axis Y axis or parallel axis
    G18 Z axis or parallel axis X axis or parallel axis
    G19 Y axis or parallel axis Z axis or parallel axis

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15T/15TT.
    EW_NOOPT No option
    The coordinate rotation option and the extended driver/library function are necessary.

    misc\cnc_rdcexesram

    Reads the SRAM variable area for C language executor specified by "offset", "length".

    When this function accesses this area, exclusive control with the C language executor side is not done.
    Therefore, it is necessary to take mediation between the application of FOCAS1/2 and the application of C language executor.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcexesram(unsigned short FlibHndl, long offset, void *data, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    offset in

    Specify the start address of SRAM variable area. The top of the area is indicated by '0'.

    data out

    Pointer to the data storage area.

    length in/out

    Pointer to the data length to be read.
    Actual data length being read is stored after this function call.
    Maximum data length which can be read at a time is the size acquired in the cnc_cexesramsize function.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    The user application is not built into CNC.
    The C language executor library does not support this function.
    EW_LENGTH The specification of length is wrong.
    The value of 0 or less was specified.
    EW_NUMBER The specification of offset is wrong.
    A negative value was specified.
    The value which exceeded the maximum value was specified.
    EW_NOOPT No option
    The C language executor function and the extended driver/library function are necessary.

    misc\cnc_rdcncid

    Reads the CNC ID number.
    The CNC ID numbers are stored in "cncid" with unsigned binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcncid(unsigned short FlibHndl, unsigned long *cncid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    cncid out

    Pointer to unsigned long data including the CNC ID numbers.
    Prepare 4 arrays for the CNC ID number.


    ERRORS

    Code Description
    EW_FUNC This function is not available.

    misc\cnc_rdcommand

    Reads the commanded data of CNC. Various information is stored in each member of ODBCMD.

    The readable data are the modal data except G code, and the commanded data.

    This function cannot be used for Series 15, 16i/18i/21i, 0i-A/B/C and Power Mate i, so use cnc_modal function instead of cnc_rdcommand function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcommand(unsigned short FlibHndl, short type, short block, short *num_cmd, ODBCMD *command);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the commanded data.

    0 to 29 : Read modal data except G code one by one.
    -1 : Read all modal data except G code at a time.
    100 to 129 : Read commanded data one by one.
    -2 : Read all commanded data at a time.
    200 to 223 : Read commanded data concerning axis one by one.
    -3 : Read all commanded data concerning axis at a time.
    block in

    Specify the block to be read.

    0 : previous block
    1 : active block
    2 : next block
    num_cmd in/out

    Pointer to the number of commanded data to be read. Specify the number of commanded data to be read before function call, and the number of commanded data which was/were read actually is stored after the function call.

    command out

    Specify the address of the array of ODBCMD structure including the commanded data. The number of array must be 1 for reading data one by one. The number of array must be the number of commanded data to be read (*num_cmd) for reading all data at a time.

    The ODBCMD structure is as follows.
    typedef struct odbcmd {
        char  adrs ;          /* command address */
        char  num ;           /* M code number or axis number */
        short flag ;          /* additional information */
        long  cmd_val ;       /* commanded data */
        long  dec_val ;       /* decimal point of commanded data */
    } ODBCMD ;
    

    Refer to the following explanation about the ODBCMD structure.

    (1) Reading the modal data except G code

      The readable modal data are commanded data D, E, F, H, L, M, N, O, S, T, and second auxiliary function (A, B, C, U, V, or W).

    • Reading data one by one
    • Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.

      type commanded address type commanded address
      0 A (2nd auxiliary function) 15 P (not used)
      1 B (2nd auxiliary function) 16 Q (not used)
      2 C (2nd auxiliary function) 17 R (not used)
      3 D 18 S
      4 E 19 T
      5 F 20 U (2nd auxiliary function)
      6 G (not used) 21 V (2nd auxiliary function)
      7 H 22 W (2nd auxiliary function)
      8 I (not used) 23 X (not used)
      9 J (not used) 24 Y (not used)
      10 K (not used) 25 Z (not used)
      11 L 26 M (2nd M code)
      12 M 27 M (3rd M code)
      13 N 28 M (4th M code)
      14 O 29 M (5th M code)

      The following data are set in the ODBCMD structure.

      adrs
      The commanded address is stored in ASCII code.
      num
      The following values are stored when "adrs" is M (=77).
        1 : 1st M code
        2 : 2nd M code
        3 : 3rd M code
        4 : 4th M code
        5 : 5th M code
      flag
      The following flags are stored.
        #3 = 1 : command differ from the previous block (only Series 30i, 0i-D/F, PMi-A)
        #4 = 1 : There is a command of a decimal point.
        #5 = 1 : Negative
        #6 = 1 : 1 digit
        #11 = 1 : There is a command after RESET.
        #15 = 1 : There is a command in the present block.
      cmd_val
      The commanded data is stored.
      dec_val
      The number of places of decimals of commanded data is stored.

      The commanded data is calculated by the following expression.
         Commanded data = cmd_val * 10 ** (-dec_val)

      (Example) The following data are read when "F1000.0" is commanded.
        adrs = F (=70)
        cmd_val = 10000
        dec_val = 1

    • Reading all data at a time
    • Specify the number of modal data to be read for "num_cmd". Specify -1 for "type". Specify the block to be read for "block". Then all modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.Specify the number in the following table for "num_cmd" in order to read all modal data. The number of modal data which were read actually is stored in "num_cmd" after the function call.

      Some same M codes may be read at a time with "multiple M commands in a single block".

      With "2nd auxiliary function" Without "2nd auxiliary function"
      With "multiple M commands in a single block" 15 14
      Without "multiple M commands in a single block" 11 10

    (2) Reading commanded data

    • Reading data one by one
    • Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then commanded data which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no data is commanded in the objective block specified by "block", zero is set in "num_cmd".

      type commanded address type commanded address
      100 A 115 P
      101 B 116 Q
      102 C 117 R
      103 D 118 S
      104 E 119 T
      105 F 120 U
      106 G (not used) 121 V
      107 H 122 W
      108 I 123 X
      109 J 124 Y
      110 K 125 Z
      111 L 126 M (2nd M code)
      112 M 127 M (3rd M code)
      113 N 128 M (4th M code)
      114 O 129 M (5th M code)

      The following data are set in the ODBCMD structure.

      adrs
      The commanded address is stored in ASCII code.
      num
      The following values are stored when "adrs" is M (=77).
        1 : 1st M code
        2 : 2nd M code
        3 : 3rd M code
        4 : 4th M code
        5 : 5th M code
      flag
      The following flags are stored.
        #4 = 1 : There is a command of a decimal point.
        #5 = 1 : Negative
        #6 = 1 : 1 digit
        #11 = (always) 1 : There is a command after RESET.
        #15 = (always) 1 : There is a command in the present block.
      cmd_val
      The commanded data is stored.
      dec_val
      The number of places of decimals of commanded data is stored.

        The commanded data is calculated by the following expression.
           Commanded data = cmd_val * 10 ** (-dec_val)

        (Example) The following data are read when "X200.00" is commanded.

        adrs = X (=88)
        cmd_val = 20000
        dec_val = 2

    • Reading all data at a time

    • Specify the number of commanded data to be read for "num_cmd". Specify -2 for "type". Specify the block to be read for "block". Then all commanded data in the objective block specified by "block" is set in the ODBCMD structure. Specify the number in the following table for "num_cmd" in order to read all commanded data. The number of commanded data which were read actually is stored in "num_cmd" after the function call.

        With "multiple M commands in a single block" : 29
        Without "multiple M commands in a single block" : 25

    (3) Reading commanded data concerning axis

    • Reading data one by one

      • Specify 1 for "num_cmd". Specify axis number (200 to 223) in the following table for "type". Specify the block to be read for "block". Then commanded data concerning axis which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no axis is commanded in the objective block specified by "block", zero is set in "num_cmd".

      • Series 15i
      • type axis
        200 1st axis
        201 2nd axis
          :   :
        209 10th axis
        210 11th axis
          :   :
        222 23th axis
        223 24th axis
        * When MAX_AXIS=15, type=215,..,223 are not used.
        * When MAX_AXIS=10, type=210,..,223 are not used.

      • Series 30i, 0i-D/F, PMi-A
      • type axis
        200 1st axis
        201 2nd axis
          :   :
        209 10th axis
        210 11th axis
          :   :
        230 31th axis
        231 32th axis

        The following data are set in the ODBCMD structure.

        adrs
        The commanded address is stored in ASCII code.
        num
        The axis number (1 to max. controlled axes) is stored in binary.
        flag
        The following flags are stored.
          #4 = 1 : There is a command of a decimal point.
          #5 = 1 : Negative
          #6 = 1 : 1 digit
          #11 = (always) 1 : There is a command after RESET.
          #15 = (always) 1 : There is a command in the present block.
        cmd_val
        The commanded data is stored.
        dec_val
        The number of places of decimals of commanded data is stored.

        The commanded data is calculated by the following expression.
           Commanded data = cmd_val * 10 ** (-dec_val)

        (Example) The following data are read when 2nd axis is "Y" and "Y50.0" is commanded.

          adrs = Y (=89)
          num = 2
          cmd_val = 500
          dec_val = 1

    • Reading all data at a time

      • Specify the number of commanded data concerning axis to be read for "num_cmd". Specify -3 for "type". Specify the block to be read for "block". Then all commanded data concerning axis in the objective block specified by "block" is set in the ODBCMD structure. Specify the following values for "num_cmd" in order to read all commanded data concerning axis. The number of commanded data which were read actually is stored in "num_cmd" after the function call.

        MAX_AXIS = 25 to 32 : 25 to 32(only Series 30i, 0i-D/F, PMi-A)
        MAX_AXIS = 24 : 24
        MAX_AXIS = 15 : 15
        MAX_AXIS = 10 : 10
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the commanded data.

    0 to 29 : Read modal data except G code one by one.
    -1 : Read all modal data except G code at a time.
    100 to 129 : Read commanded data one by one.
    -2 : Read all commanded data at a time.
    200 to 223 : Read commanded data concerning axis one by one.
    -3 : Read all commanded data concerning axis at a time.
    block in

    Specify the block to be read.

    0 : previous block
    1 : active block
    2 : next block
    num_cmd in/out

    Pointer to the number of commanded data to be read. Specify the number of commanded data to be read before function call, and the number of commanded data which was/were read actually is stored after the function call.

    command out

    Specify the address of the array of ODBCMD structure including the commanded data. The number of array must be 1 for reading data one by one. The number of array must be the number of commanded data to be read (*num_cmd) for reading all data at a time.

    The ODBCMD structure is as follows.
    typedef struct odbcmd {
        char  adrs ;          /* command address */
        char  num ;           /* M code number or axis number */
        short flag ;          /* additional information */
        long  cmd_val ;       /* commanded data */
        long  dec_val ;       /* decimal point of commanded data */
    } ODBCMD ;

    Refer to the following explanation about the ODBCMD structure.

    (1) Reading the modal data except G code

      The readable modal data are commanded data D, E, F, H, L, M, N, O, S, T, and second auxiliary function (A, B, C, U, V, or W).

    • Reading data one by one
    • Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.

      type commanded address type commanded address
      0 A (2nd auxiliary function) 15 P (not used)
      1 B (2nd auxiliary function) 16 Q (not used)
      2 C (2nd auxiliary function) 17 R (not used)
      3 D 18 S
      4 E 19 T
      5 F 20 U (2nd auxiliary function)
      6 G (not used) 21 V (2nd auxiliary function)
      7 H 22 W (2nd auxiliary function)
      8 I (not used) 23 X (not used)
      9 J (not used) 24 Y (not used)
      10 K (not used) 25 Z (not used)
      11 L 26 M (2nd M code)
      12 M 27 M (3rd M code)
      13 N 28 M (4th M code)
      14 O 29 M (5th M code)

      The following data are set in the ODBCMD structure.

      adrs
      The commanded address is stored in ASCII code.
      num
      The following values are stored when "adrs" is M (=77).
        1 : 1st M code
        2 : 2nd M code
        3 : 3rd M code
        4 : 4th M code
        5 : 5th M code
      flag
      The following flags are stored.
        #3 = 1 : command differ from the previous block
        #4 = 1 : There is a command of a decimal point.
        #5 = 1 : Negative
        #6 = 1 : 1 digit
        #11 = 1 : There is a command after RESET.
        #15 = 1 : There is a command in the present block.
      cmd_val
      The commanded data is stored.
      dec_val
      The number of places of decimals of commanded data is stored.

      The commanded data is calculated by the following expression.
         Commanded data = cmd_val * 10 ** (-dec_val)

      (Example) The following data are read when "F1000.0" is commanded.
        adrs = F (=70)
        cmd_val = 10000
        dec_val = 1

    • Reading all data at a time
    • Specify the number of modal data to be read for "num_cmd". Specify -1 for "type". Specify the block to be read for "block". Then all modal data except G code in the objective block specified by "block" is set in the ODBCMD structure.Specify the number in the following table for "num_cmd" in order to read all modal data. The number of modal data which were read actually is stored in "num_cmd" after the function call.

      Some same M codes may be read at a time with "multiple M commands in a single block".

      With "2nd auxiliary function" Without "2nd auxiliary function"
      With "multiple M commands in a single block" 15 14
      Without "multiple M commands in a single block" 11 10

    (2) Reading commanded data

    • Reading data one by one
    • Specify 1 for "num_cmd". Specify the commanded address in the following table for "type". Specify the block to be read for "block". Then commanded data which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no data is commanded in the objective block specified by "block", zero is set in "num_cmd".

      type commanded address type commanded address
      100 A 115 P
      101 B 116 Q
      102 C 117 R
      103 D 118 S
      104 E 119 T
      105 F 120 U
      106 G (not used) 121 V
      107 H 122 W
      108 I 123 X
      109 J 124 Y
      110 K 125 Z
      111 L 126 M (2nd M code)
      112 M 127 M (3rd M code)
      113 N 128 M (4th M code)
      114 O 129 M (5th M code)

      The following data are set in the ODBCMD structure.

      adrs
      The commanded address is stored in ASCII code.
      num
      The following values are stored when "adrs" is M (=77).
        1 : 1st M code
        2 : 2nd M code
        3 : 3rd M code
        4 : 4th M code
        5 : 5th M code
      flag
      The following flags are stored.
        #4 = 1 : There is a command of a decimal point.
        #5 = 1 : Negative
        #6 = 1 : 1 digit
        #11 = (always) 1 : There is a command after RESET.
        #15 = (always) 1 : There is a command in the present block.
      cmd_val
      The commanded data is stored.
      dec_val
      The number of places of decimals of commanded data is stored.

        The commanded data is calculated by the following expression.
           Commanded data = cmd_val * 10 ** (-dec_val)

        (Example) The following data are read when "X200.00" is commanded.

        adrs = X (=88)
        cmd_val = 20000
        dec_val = 2

    • Reading all data at a time

    • Specify the number of commanded data to be read for "num_cmd". Specify -2 for "type". Specify the block to be read for "block". Then all commanded data in the objective block specified by "block" is set in the ODBCMD structure. Specify the number in the following table for "num_cmd" in order to read all commanded data. The number of commanded data which were read actually is stored in "num_cmd" after the function call.

    (3) Reading commanded data concerning axis

    • Reading data one by one

      • Specify 1 for "num_cmd". Specify axis number (200 to 223) in the following table for "type". Specify the block to be read for "block". Then commanded data concerning axis which is commanded in the objective block specified by "block" is set in the ODBCMD structure. When no axis is commanded in the objective block specified by "block", zero is set in "num_cmd".

        type axis
        200 1st axis
        201 2nd axis
          :   :
          :   :
        230 31th axis
        231 32th axis

        The following data are set in the ODBCMD structure.

        adrs
        The commanded address is stored in ASCII code.
        num
        The axis number (1 to max. controlled axes) is stored in binary.
        flag
        The following flags are stored.
          #3 = 1 : command differ from the previous block
          #4 = 1 : There is a command of a decimal point.
          #5 = 1 : Negative
          #6 = 1 : 1 digit
          #11 = (always) 1 : There is a command after RESET.
          #15 = (always) 1 : There is a command in the present block.
        cmd_val
        The commanded data is stored.
        dec_val
        The number of places of decimals of commanded data is stored.

        The commanded data is calculated by the following expression.
           Commanded data = cmd_val * 10 ** (-dec_val)

        (Example) The following data are read when 2nd axis is "Y" and "Y50.0" is commanded.

          adrs = Y (=89)
          num = 2
          cmd_val = 500
          dec_val = 1

    • Reading all data at a time

      • Specify the number of commanded data concerning axis to be read for "num_cmd". Specify -3 for "type". Specify the block to be read for "block". Then all commanded data concerning axis in the objective block specified by "block" is set in the ODBCMD structure. Specify the following values for "num_cmd" in order to read all commanded data concerning axis. The number of commanded data which were read actually is stored in "num_cmd" after the function call.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of G code data to be read (num_cmd) is wrong.
    EW_NUMBER Data number error
    The specification of commanded data (type) is wrong.
    EW_ATTRIB Data attribute error
    The specification of block (block) is wrong.

    misc\cnc_rdcoordnum

    Reads the number of the additional workpiece coordinate systems of the workpiece coordinate systems.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcoordnum(unsigned short FlibHndl, short *coordnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    coordnum out

    Specify the pointer to data which stores the additional workpiece coordinate systems number. When the additional work coordinate systems is not specified, the "0" is acquired.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_NOOPT No option
    The addition of workpiece coordinate system 48-pairs option or the "addition of workpiece coordinate system 300-pairs option, and the extended driver/library function are necessary.

    misc\cnc_rddiag_ext

    Reads the random number diagnosis data. The diagnosis data numbers are specified by the array of long type ("prm_no[]"). And the number of the array is specified by "num".

    The information of diagnosis data is stored to the array of IODBPRM structure. If an invalid diagnosis data number is specified, the type field of the IODBPRM structure is -1. In case of non-axis type diagnosis data, the diagnosis data value is stored to the data[0] of the IODBPRM structure. And, in case of axis-type diagnosis data, the diagnosis data value is stored to the data array of the structure.

    All diagnosis data values are stored to long type. So your application have to cast them according to the type information.

    See the "MAINTENANCE MANUAL" of CNC for details of each diagnosis data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddiag_ext(unsigned short FlibHndl, long *prm_no, short num, IODBPRM *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prm_no in

    Specify the pointer to the array of the diagnosis data numbers.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    num in

    Specify the number of the diagnosis data to be read.

    param out

    Specify the pointer to the array of IODBPRM structure to store the diagnosis data. The number of array must be equal to "num".

    The IODBPRM structure is as follows.
    typedef struct iodbprm {
            long datano;        /* diagnosis data number */
            short type;         /* type information */
            short axis;         /* axis information */
            short info;         /* attribute */
            short unit;         /* unit */
            struct {
                long prm_val;   /* diagnosis data value */
                long dec_val;   /* place of decimal point */
            } data[32];
    } IODBPRM;
    
    datano
    diagnosis data number which was read is stored.
    type
    Type information of diagnosis data which was read is stored.
    0 : byte type
    1 : word type
    2 : 2-word type
    3 : bit type (8 bit)
    4 : bit type (1 bit : except Series 15i)
    5 : real type (only Series 15i, 30i, 0i-D/F, PMi-A)
    -1 : invalid diagnosis data
    axis
    Axis information of diagnosis data which was read is stored.
    bit 0
    : axis attribute
    0
    : without axis
    1
    : with axis
    bit 1
    : spindle data
    0
    : no spindle
    1
    : spindle
    bit 2,..,15 : (reserve)
    info
    Axis information of diagnosis data which was read is stored.
    bit 0
    : sign
    0
    : with sign
    1
    : without sign
    bit 1,..,15 : (reserve)
    unit
    Unit of diagnosis data which was read is stored.
    bit 0, 1
    : unit
    0
    : without unit
    1
    : %
    2
    : RPM
    bit 2,..,15 : (reserve)
    data
    Value of diagnosis data which was read is stored.
    prm_val
    : Value of diagnosis data
    dec_val
    : Place of decimal point (only available for real type)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prm_no in

    Specify the pointer to the array of the diagnosis data numbers.

    See the "MAINTENANCE MANUAL" of CNC about available diagnosis number. It can be got by cnc_rddiagnum function and cnc_rddiaginfo function.

    num in

    Specify the number of the diagnosis data to be read.

    param out

    Specify the pointer to the array of IODBPRM structure to store the diagnosis data. The number of array must be equal to "num".

    The IODBPRM structure is as follows.
    typedef struct iodbprm {
            long datano;        /* diagnosis data number */
            short type;         /* type information */
            short axis;         /* axis information */
            short info;         /* attribute */
            short unit;         /* unit */
            struct {
                long prm_val;   /* diagnosis data value */
                long dec_val;   /* place of decimal point */
            } data[32];
    } IODBPRM;
    
    datano
    diagnosis data number which was read is stored.
    type
    Type information of diagnosis data which was read is stored.
    0 : byte type
    1 : word type
    2 : 2-word type
    3 : bit type (8 bit)
    4 : bit type (1 bit)
    5 : real type
    -1 : invalid diagnosis data
    axis
    Axis information of diagnosis data which was read is stored.
    bit 0 : axis attribute
    0 : without axis
    1 : with axis
    bit 1 : spindle data
    0 : no spindle
    1 : spindle
    bit 3,..,15 : (reserve)
    info
    Axis information of diagnosis data which was read is stored.
    bit 0
    : sign
    0 : with sign
    1 : without sign
    bit 1,..,15 : (reserve)
    unit
    Unit of diagnosis data which was read is stored.
    bit 0, 1 : unit
    0 : without unit
    1 : %
    2 : RPM
    bit 2,..,15 : (reserve)
    data
    Value of diagnosis data which was read is stored.
    prm_val : Value of diagnosis data
    dec_val : Place of decimal point (only available for real type)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of diagnosis data (num) is 0 or less.

    misc\cnc_rddiaginfo

    Reads the CNC diagnosis data information specified by "s_number" and "read_no".

    The CNC diagnosis data is basically non-continuous, and the attribute like the type and the size, etc. is different in each number. Use this function for such as displaying the diagnosis data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddiaginfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBDIAGIF *diagif);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in Specify the start diagnosis data number.
    read_no in Specify the number of the diagnosis data information to be read.
    diagif out

    Pointer to the ODBDIAGIF structure including the diagnosis data information.

    The ODBDIAGIF structure is as follows.
    typedef struct odbdiagif {
       unsigned short info_no ;
                    /* number of diagnosis data information */
       short        prev_no ; /* previous diagnosis data number */
       short        next_no ; /* next diagnosis data number */
       struct {
            short   diag_no ; /* diagnosis data number */
            short   diag_type ; /* attribute of diagnosis data */
       } info[N] ;  /* N is number of diagnosis data information */
    } ODBDIAGIF ;
    
    info_no
    Number of diagnosis data information
    Number of the diagnosis data information which was read actually.
    prev_no
    Previous diagnosis data number
    Previous effective number of the diagnosis data information which was read first.
    next_no
    Next diagnosis data number
    Next effective number of the diagnosis data information which was read lastly.
    info[N].diag_no
    Setting data number
    The setting data number which exists actually.
    info[N].diag_type
    Attribute of diagnosis data
    The following attributes are set.
    • For Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • bit 0, 1 : type attribute (It is effective when bit 3 = 0)
      0 : bit type (8 bit)
      1 : byte type
      2 : word type
      3 : 2-word type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : type attribute
      1 : bit type (1 bit)
      bit 4,11,12 : display attribute (only 16i/18i/21i)
      #04=1 : 10 digits display
      #11=1 : date format(yyyy/mm/dd)
      #12=1 : time format(hh:mm:ss)
      bit 5,..,10,13,..,15 : (reserve)

    • For Series 15i
    • bit 0, 1 : (reserve)
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : (reserve)
      bit 4,..,6 : type attribute
      0 : byte type
      1 : word type
      2 : 2-word type
      3 : bit type (8 bit)
      4 : (reserve)
      5 : real type
      bit 7 : integer without sign (It is effective when type attribute = 0, 1, 2)
      1 : without sign
      0 : with sign
      bit 8,..,11 : array type
      0 : not array
      1 : array of axis
      2 : array of spindle
      bit 12,..,15 : data unit
      0 : no unit
      1 : %
      2 : RPM

    • For Series 30i, 0i-D/F, PMi-A
    • bit 0, 1 : axis attribute (It is effective when bit 3 = 0)
      0 : bit type (8 bit)
      1 : byte type
      2 : word type
      3 : 2-word type or real type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : type attribute
      1 : bit type (1 bit)
      bit 7 : sign
      0 : without sign
      1 : with sign
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : (reserve)
      bit 12 : in case that type attribute = 3
      0 : except real type
      1 : real type
      bit 13,..,15 : (reserve)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in Specify the start diagnosis data number.
    read_no in Specify the number of the diagnosis data information to be read.
    diagif out

    Pointer to the ODBDIAGIF structure including the diagnosis data information.

    The ODBDIAGIF structure is as follows.
    typedef struct odbdiagif {
       unsigned short info_no ;
                    /* number of diagnosis data information */
       short        prev_no ; /* previous diagnosis data number */
       short        next_no ; /* next diagnosis data number */
       struct {
            short   diag_no ; /* diagnosis data number */
            short   diag_type ; /* attribute of diagnosis data */
       } info[N] ;  /* N is number of diagnosis data information */
    } ODBDIAGIF ;
    
    info_no
    Number of diagnosis data information
    Number of the diagnosis data information which was read actually.
    prev_no
    Previous diagnosis data number
    Previous effective number of the diagnosis data information which was read first.
    next_no
    Next diagnosis data number
    Next effective number of the diagnosis data information which was read lastly.
    info[N].diag_no
    Setting data number
    The setting data number which exists actually.
    info[N].diag_type
    Attribute of diagnosis data
    The following attributes are set.
      bit 0, 1 : axis attribute (It is effective when bit 3 = 0)
      0 : bit type (8 bit)
      1 : byte type
      2 : word type
      3 : 2-word type or real type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : type attribute
      1 : bit type (1 bit)
      bit 7 : sign
      0 : without sign
      1 : with sign
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : (reserve)
      bit 12 : in case that type attribute = 3
      0 : except real type
      1 : real type
      bit 13,..,15 : (reserve)

    ERRORS

    Code Description
    EW_NUMBER Data number error
    Start diagnosis data number (s_number) is wrong.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    misc\cnc_rddiagnum

    Reads minimum, maximum, total number of the CNC diagnosis data.

    The distribution of the diagnosis data is different in each CNC model, and the new diagnosis data may be added because of the expansion of CNC function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddiagnum(unsigned short FlibHndl, ODBDIAGNUM *diagnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    diagnum out

    Pointer to the ODBDIAGNUM structure including the minimum, maximum, total number of the diagnosis data.

    The ODBDIAGNUM structure is as follows.
    typedef struct odbdiagnum {
            unsigned short diag_min ;
                            /* mininum number of diagnosis data */
            unsigned short diag_max ;
                            /* maximum number of diagnosis data */
            unsigned short total_no ;
                            /* total number of diagnosis data */
    } ODBDIAGNUM ;
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    misc\cnc_rdetherinfo

    Reads the Ethernet board inforamtion in CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdetherinfo(unsigned short FlibHndl, short *type, short *device);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type out

    Specify the pointer to the variable by which the communication type of the Ethernet board is stored.

    1 : Ethernet Board or Data Server Board
    2 : Fast Ethernet Board or Fast Data Server Board
    3 : Embedded Ethernet (Built-in)
    4 : Embedded Ethernet (PCMCIA)
    5 : Windows NT/2000 Ethernet Server
    6 : Windows CE Ethernet Server
    7 : FL-net Board
    device out

    Specify the pointer to the variable by which the kind of the storage device of Data Server is stored.

    0 : non
    1 : HDD
    2 : ATA Card

    This data is effective only at "type=1,2".


    ERRORS

    Code Description
    EW_FUNC Unavailable
    The NC control software or the Ethernet firmware does not support this function.

    misc\cnc_rdfixcycle

    Reads the mode and data of the canned cycle.

    These are stored in each member of ODBFIX structure.

    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdfixcycle(unsigned short FlibHndl, ODBFIX *fixcyc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    fixcyc out

    Pointer to the ODBFIX structure for the data of the canned cycle. The ODBFIX structure is as follows.

    typedef struct odbfix {
        short   mode;       /* canned cycle mode                 */
        short   pln_axes[2];/* axis of plane selection           */
        short   drl_axes;   /* axis of drilling                  */
        long    i_pos;      /* absolute position of Initial point*/
        long    r_pos;      /* absolute position of R point      */
        long    z_pos;      /* absolute position of Z point      */
        long    cmd_cnt;    /* command of number of repeats      */
        long    act_cnt;    /* current number of repeats         */
        long    cut;        /* cut-in value                      */
        long    shift[2];   /* shift value                       */
    } ODBFIX ;
    
    mode
    Mode of the canned cycle is set.
    0 : cancel mode
    1 : canned cycle mode
    * In case of '0', the data except 'mode' is invalid.
    pln_axes
    Axis number of plane selection is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    pln_axes[0] : 1st axis number
    pln_axes[1] : 2nd axis number
    drl_axes
    Axis number of drilling axis is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    i_pos
    Absolute position of Initial point is set.
    r_pos
    Absolute position of R point is set.
    z_pos
    Absolute position of Z point is set.
    cmd_cnt
    Command of number of repeats is set.
    act_cnt
    Current number of repeats is set.
    cut
    Cut-in value of G73(High-speed peck drilling cycle), G83(Peck drilling cycle) is set.
    shift
    Shift value of G76(Fine boring cycle), G87(Boring cycle) is set.
    shift[0] : 1st axis
    shift[1] : 2nd axis
    In case of CNC parameter 6200#2=0, shift[1] is not used.

    Each member of 'ODBFIX' according to CNC parameter and the G code of plane selection is as follows.

    * The basic axis of following table includes its parallel axis.

    CNC parameter 6200#2=1, 6200#0=1

    i_pos r_pos z_pos cut shift[0] shift[1]
    G17 Z axis X axis Y axis
    G18 Y axis Z axis X axis
    G19 X axis Y axis Z axis

    CNC parameter 6200#2=1, 6200#0=0

    i_pos r_pos z_pos cut shift[0] shift[1]
    G17 Z axis X axis Y axis
    G18 Z axis X axis
    G19 Y axis Z axis

    CNC parameter 6200#2=0, 6200#0=1

    i_pos r_pos z_pos cut shift[0] shift[1]
    G17 Z axis Note) not used
    G18 Y axis
    G19 X axis

    CNC parameter 6200#2=0, 6200#0=0

    i_pos r_pos z_pos cut shift[0] shift[1]
    G17 Z axis Note) not used
    G18
    G19

    Note) Axis indicated by CNC parameter 6240


    ERRORS

    Code Description
    EW_NOOPT No option
    The canned cycle option and the extended driver/library function are necessary.

    misc\cnc_rdgcode

    Reads the information of CNC about the commanded G code. Various information is stored in each member of ODBGCD.

    The readable data are modal G code and one shot G code.

    This function cannot be used for Series 16/18/21, 15, 16i/18i/21i, 0i-A/B/C, and Power Mate i, so use cnc_modal function instead of cnc_rdgcode function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgcode(unsigned short FlibHndl, short type, short block, short *num_gcd, ODBGCD *g_code );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the group of G code.

  • Series 15i
  • 0 to 18,24,25,27 : Read data of modal G code one by one.
    -1 : Read all data of modal G code at a time.
    100 to 103 : Read data of one shot G code one by one.
    -2 : Read all data of one shot G code at a time.

  • Series 30i, 0i-D/F, PMi-A
  • 0 to 36 : Read data of modal G code one by one.
    -1 : Read all data of modal G code at a time.
    100 to 103 : Read data of one shot G code one by one.
    -2 : Read all data of one shot G code at a time.
    block in

    Specify the block to be read.

    0 : previous block
    1 : active block
    2 : next block
    num_gcd in/out

    Pointer to the number of G code data to be read. Specify the number of G code data to be read before function call, and the number of G code data which was/were read actually is stored after the function call.

    g_code out

    Specify the address of the array of ODBGCD structure including the G code data. The number of array must be 1 for reading data one by one. The number of array must be the number of G code to be read (*num_gcd) for reading all data at a time.

    The ODBGCD structure is as follows.
    typedef struct odbgcd {
        short group ;           /* G code group */
        short flag ;            /* additional information */
        char  code[8] ;         /* G code */
    } ODBGCD ;
    

    Refer to the following explanation about the ODBGCD structure.

    (1) Reading modal G code

    • Reading data one by one
    • Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure.

      • Series 15i
      • type G code type G code type G code
        0 G00 7 G43 13 G54
        G01 G43.1 G54.1
        G02 G44 G54.2
        G02.1 G49 G55
        G02.2 8 G73 G56
        G02.3 G74 G57
        G02.4 G76 G58
        G03 G80 G59
        G03.1 G81 14 G61
        G03.2 G82 G62
        G03.3 G83 G63
        G03.4 G84 G64
        G06.1 G84.2 15 G68
        G06.2 G84.3 G69
        G33 G85 16 G15
        G60 G86 G16
        1 G17 G87 17 G50.1
        G18 G88 G51.1
        G19 G89 18 G40.1
        2 G90 9 G98 G41.1
        G91 G99 G42.1
        3 G22 10 G50 24 G25
        G23 G51 G26
        4 G93 11 G66 25 G12.1
        G94 G66.1 G13.1
        G95 G67 27 G80.5
        5 G20 12 G96 G81.5
        G21 G97
        6 G40
        G41
        G41.2
        G41.3
        G42
        G42.2

      • Series 30i, 0i-D/F, PMi-A
      • M Series T Series
        type G code G code
        SystemA
        G code
        SystemB
        G code
        SystemC
        0 G0 G0 G0 G0
        G1 G1 G1 G1
        G2 G2 G2 G2
        G3 G3 G3 G3
        G33 G32 G33 G33
        G75 G90 G77 G20
        G77 G92 G78 G21
        G78 G94 G79 G24
        G79      
          G34 G34 G34
        G2.2      
        G3.2      
        G2.3      
        G3.3      
        G6.2 G35 G35 G35
        G2.4 G36 G36 G36
        G3.4      
          G6.2 G6.2 G6.2
          G2.4 G2.4 G2.4
          G3.4 G3.4 G3.4
          G2.2 G2.2 G2.2
          G3.2 G3.2 G3.2
        G35 G2.3 G2.3 G2.3
        G36 G3.3 G3.3 G3.3
        G34 G6.1 G6.1 G6.1
        G32.2      
        G2.1 G2.1 G2.1 G2.1
        G3.1 G3.1 G3.1 G3.1
        1 G17 G97 G97 G97
          G96 G96 G96
        G19      
        G18      
        G17.1      
        2 G90   G90 G90
        G91   G91 G91
        3 G23 G69 G69 G69
        G22 G68 G68 G68
        4 G94 G98 G94 G94
        G95 G99 G95 G95
        G93 G93 G93 G93
        G93.2      
        G93.3 G93.3 G93.3 G93.3
        5 G20(G70) G20 G20 G70
        G21(G71) G21 G21 G71
        6 G40 G40 G40 G40
        G41 G41 G41 G41
        G42 G42 G42 G42
        G41.2 G41.2 G41.2 G41.2
        G42.2 G42.2 G42.2 G42.2
        G41.3 G41.3 G41.3 G41.3
        G41.4 G41.4 G41.4 G41.4
        G42.4 G42.4 G42.4 G42.4
        G41.5 G41.5 G41.5 G41.5
        G42.5 G42.5 G42.5 G42.5
        G41.6 G40.3 G40.3 G40.3
        G42.6 G41.6 G41.6 G41.6
          G42.6 G42.6 G42.6
          G46.8 G46.8 G46.8
        7 G49(G49.1) G25 G25 G25
        G43 G26 G26 G26
        G44      
        G43.1      
        G43.4      
        G43.5      
        G43.2      
        G43.3      
        G43.8      
        G43.9      
        G43.7(G44.7)      
        G44.1      
        8 G80 G23 G23 G23
        G81 G22 G22 G22
        G82      
        G83      
        G84      
        G85      
        G86      
        G87      
        G88      
        G89      
        G73      
        G74      
        G76      
        G84.2      
        G84.3      
        G81.2      
        9 G98 G80 G80 G80
        G99 G83 G83 G83
          G84 G84 G84
          G85 G85 G85
          G86 G86 G86
          G87 G87 G87
          G88 G88 G88
          G89 G89 G89
          G81 G81 G81
          G82 G82 G82
          G83.1 G83.1 G83.1
          G84.2 G84.2 G84.2
          G83.5 G83.5 G83.5
          G87.5 G87.5 G87.5
          G83.6 G83.6 G83.6
          G87.6 G87.6 G87.6
          G86.1 G86.1 G86.1
          G84.1 G84.1 G84.1
        10 G50   G98 G98
        G51   G99 G99
        11 G67 G67 G67 G67
        G66 G66 G66 G66
        G66.1 G66.1 G66.1 G66.1
        12 G97      
        G96      
        13 G54(G54.1) G54(G54.1) G54(G54.1) G54(G54.1)
        G55 G55 G55 G55
        G56 G56 G56 G56
        G57 G57 G57 G57
        G58 G58 G58 G58
        G59 G59 G59 G59
        14 G64 G64 G64 G64
        G61 G61 G61 G61
        G62 G62 G62 G62
        G63 G63 G63 G63
        15 G69 G17 G17 G17
        G68      
        G68.2      
        G68.3      
        G68.4 G18 G18 G18
          G19 G19 G19
          G17.1 G17.1 G17.1
        16 G15 G69.1 G69.1 G69.1
        G16 G68.1 G68.1 G68.1
          G68.2 G68.2 G68.2
          G68.3 G68.3 G68.3
          G68.4 G68.4 G68.4
        17 G40.1(G150)   G50 G50
        G41.1(G151)   G51 G51
        G42.1(G152)      
        18 G25 G40.1 G40.1 G40.1
        G26 G41.1 G41.1 G41.1
          G42.1 G42.1 G42.1
        19 G160 G50.2(G250) G50.2(G250) G50.2(G250)
        G161 G51.2(G251) G51.2(G251) G51.2(G251)
        20 G13.1(G113) G13.1(G113) G13.1(G113) G13.1(G113)
        G12.1(G112) G12.1(G112) G12.1(G112) G12.1(G112)
        21 G50.1 G50.1 G50.1 G50.1
        G51.1 G51.1 G51.1 G51.1
        22 G54.2 G49(G49.1) G49(G49.1) G49(G49.1)
          G43 G43 G43
          G44 G44 G44
          G43.1 G43.1 G43.1
          G43.4 G43.4 G43.4
          G43.5 G43.5 G43.5
          G43.7(G44.7) G43.7(G44.7) G43.7(G44.7)
          G43.8 G43.8 G43.8
          G43.9 G43.9 G43.9
          G44.1 G44.1 G44.1
        23 G80.5 G15 G15 G15
        G81.5 G16 G16 G16
        24   G5.5 G5.5 G5.5
          G5.6 G5.6 G5.6
        25   G54.4 G54.4 G54.4
        26 G49.9 G80.5 G80.5 G80.5
        G44.9 G81.5 G81.5 G81.5
        27   G80.4(G80.8) G80.4(G80.8) G80.4(G80.8)
          G81.4(G81.4) G81.4(G81.4) G81.4(G81.4)
        28   G8.9 G8.9 G8.9
          G8.8 G8.8 G8.8
        29 G54.3 G5.7 G5.7 G5.7
          G5.8 G5.8 G5.8
        30 G50.2 G10.3 G10.3 G10.3
        G51.2 G10.4 G10.4 G10.4
          G10.5 G10.5 G10.5
        31 G5.5      
        G5.6      
        32 G54.4      
        33 G80.4(G80.8)      
        G81.4(G81.8)      
        34 G13      
        G12      
        35 G8.9      
        G8.8      
        36 G5.7      
        G5.8      

      The following data are set in the ODBGCD structure.

      group
      The group number which was specified by "type" is stored.
      flag
      The following flag is stored.
      #3 = 1 : command differ from the previous block (only Series 30i, 0i-D/F, PMi-A)
      #7 = 1 : There is a command in the present block.
      code
      G code is stored as a character string (ASCII).

      For example, the following result is gotten by calling this function during executing N100's block of the next machining program.

      N090 G18 ;
      N100 G01 Z100. ;
      N110 G17 G02 X10. Y-20. R12. ;
      
      type block code flag Modal status
      0 1 G01\0 0x0080 G01 is commanded.
      0 2 G02\0 0x0080 G02 is commanded.
      1 1 G18\0 0x0000 G18 mode. (not commanded)
      1 2 G17\0 0x0080 G17 is commanded.

    • Reading all data at a time
    • Specify the number of G code to be read for "num_gcd". Specify -1 for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure. Specify the maximun group number for "num_gcd" in order to read all groups of G code. The number of G code which were read actually is stored in "num_gcd" after the function call.

    (2) Reading one shot G code

    • Reading data one by one
    • Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".

      When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".

      • Series 15i
      • type G code type G code
        100 G04 101 G09
        G05.1 102 G53
        G07 103 G38
        G07.1 G45
        G10 G46
        G10.1 G47
        G10.6 G48
        G10.9
        G11
        G12.2
        G13.2
        G27
        G28
        G29
        G30
        G30.1
        G31
        G31.1
        G31.2
        G31.3
        G31.4
        G31.8
        G31.9
        G37
        G39
        G52
        G60
        G65
        G72.1
        G72.2
        G81.1
        G92
        G92.1

      • Series 30i, 0i-D/F, PMi-A
      • M Series T Series
        type G code G code
        SystemA
        G code
        SystemB
        G code
        SystemC
        100 G4 G4 G4 G4
        G10 G27 G27 G27
          G28 G28 G28
          G29 G29 G29
        G27 G30 G30 G30
        G28 G50 G92 G92
        G29 G70 G70 G72
        G30 G71 G71 G73
          G72 G72 G74
        G39 G73 G73 G75
          G74 G74 G76
          G75 G75 G77
          G76 G76 G78
          G10 G10 G10
        G92 G37.1 G37.1 G37.1
          G37(G37.2) G37(G37.2) G37(G37.2)
        G31(G31.1) G31 G31 G31
        G60 G65 G65 G65
        G65      
          G5 G5 G5
        G5 G11 G11 G11
        G11 G7.1(G107) G7.1(G107) G7.1(G107)
        G52 G52 G52 G52
               
        G37 G30.1 G30.1 G30.1
        G7.1(G107) G10.6 G10.6 G10.6
        G30.1 G50.3 G92.1 G92.1
        G10.6 G8 G8 G8
        G72.1 G100 G110 G101
        G72.2 G39 G39 G39
        G92.1 G60 G60 G60
        G8      
          G31.8 G31.8 G31.8
        G70.7      
        G71.7      
        G72.7      
        G73.7      
        G74.7      
        G75.7      
        G76.7      
          G37.3 G37.3 G37.3
          G31.9 G31.9 G31.9
          G10.9 G10.9 G10.9
        G81.1 G7 G7 G7
          G73.1 G73.1 G73.1
          G73.2 G73.2 G73.2
        G5.1 G81.1 G81.1 G81.1
        G7 G5.4 G5.4 G5.4
        G31.8      
        G31.9      
        G12.4 G82.4 G82.4 G82.4
        G13.4 G83.4 G83.4 G83.4
        G5.4 G84.4 G84.4 G84.4
        G10.9 G5.1 G5.1 G5.1
        G31.2 G72.1 G72.1 G72.1
        G31.3 G72.2 G72.2 G72.2
        G31.4      
        G91.1      
        G28.2      
        G30.2      
        G50.4 G50.4 G50.4 G50.4
        G50.5 G50.5 G50.5 G50.5
        G50.6 G50.6 G50.6 G50.6
        G51.4 G51.4 G51.4 G51.4
        G51.5 G51.5 G51.5 G51.5
        G51.6 G51.6 G51.6 G51.6
        G37.1 G91.1 G91.1 G91.1
        G37.2 G28.2 G28.2 G28.2
        G37.3 G30.2 G30.2 G30.2
        101 G9(G65.4) G9(G65.4) G9(G65.4) G9(G65.4)
        G96.1 G96.1 G96.1 G96.1
        G96.2 G96.2 G96.2 G96.2
        G96.3 G96.3 G96.3 G96.3
        G96.4 G96.4 G96.4 G96.4
        G22.2 G22.2 G22.2 G22.2
        G52.1 G52.1 G52.1 G52.1
        G52.2 G52.2 G52.2 G52.2
        G52.3 G52.3 G52.3 G52.3
        G0.1 G0.1 G0.1 G0.1
        G5.9 G5.9 G5.9 G5.9
        102 G53 G53 G53 G53
        G53.1 G53.1 G53.1 G53.1
        G53.6 G53.6 G53.6 G53.6
        G53.2 G53.2 G53.2 G53.2
        G53.7 G53.7 G53.7 G53.7
        103 G38 G38 G38 G38
        G45 G41.8 G41.8 G41.8;
        G46 G42.8 G42.8 G42.8
        G47      
        G48      
        G10.8 G10.8 G10.8 G10.8
          G91.2 G91.2 G91.2

      The following data are set in the ODBGCD structure.

      group
      The group number which was specified by "type" is stored.
      flag
      The following flag is stored.
      #3 = 1 : command differ from the previous block (only Series 30i, 0i-D/F, PMi-A)
      #4 = 1 : There is a command of a decimal point.
      #5 = 1 : Negative
      #6 = 1 : 1 digit
      #7 = (always)1 : There is a command in the present block.
      code
      For example, the following result is gotten by calling this function during executing N100's block of the next machining program.

    • Reading all data at a time
    • Specify the number of one shot G code to be read for "num_gcd". Specify -2 for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. Specify 4 for "num_gcd" in order to read all groups of one shot G code. The number of G code which were read actually is stored in "num_gcd" after the function call.

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the group of G code.

    0 to 23,26,29 to 31 : Read data of modal G code one by one.
    -1 : Read all data of modal G code at a time.
    100 to 103 : Read data of one shot G code one by one.
    -2 : Read all data of one shot G code at a time.
    block in

    Specify the block to be read.

    0 : previous block
    1 : active block
    2 : next block
    num_gcd in/out

    Pointer to the number of G code data to be read. Specify the number of G code data to be read before function call, and the number of G code data which was/were read actually is stored after the function call.

    g_code out

    Specify the address of the array of ODBGCD structure including the G code data. The number of array must be 1 for reading data one by one. The number of array must be the number of G code to be read (*num_gcd) for reading all data at a time.

    The ODBGCD structure is as follows.
    typedef struct odbgcd {
        short group ;           /* G code group */
        short flag ;            /* additional information */
        char  code[8] ;         /* G code */
    } ODBGCD ;

    Refer to the following explanation about the ODBGCD structure.

    (1) Reading modal G code

    • Reading data one by one
    • Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure.

        M Series T Series
        type G code G code
        SystemA
        G code
        SystemB
        G code
        SystemC
        0 G0 G0 G0 G0
        G1 G1 G1 G1
        G2 G2 G2 G2
        G3 G3 G3 G3
        G33 G32 G33 G33
        G75 G90 G77 G20
        G77 G92 G78 G21
        G78 G94 G79 G24
        G79      
          G34 G34 G34
        G2.2      
        G3.2      
        G2.3      
        G3.3      
        G6.2 G35 G35 G35
        G2.4 G36 G36 G36
        G3.4      
          G6.2 G6.2 G6.2
          G2.4 G2.4 G2.4
          G3.4 G3.4 G3.4
          G2.2 G2.2 G2.2
          G3.2 G3.2 G3.2
        G35 G2.3 G2.3 G2.3
        G36 G3.3 G3.3 G3.3
        G34 G6.1 G6.1 G6.1
        G32.2      
        G2.1 G2.1 G2.1 G2.1
        G3.1 G3.1 G3.1 G3.1
        1 G17 G97 G97 G97
          G96 G96 G96
        G19      
        G18      
        G17.1      
        2 G90   G90 G90
        G91   G91 G91
        3 G23 G69 G69 G69
        G22 G68 G68 G68
        4 G94 G98 G94 G94
        G95 G99 G95 G95
        G93 G93 G93 G93
        G93.2      
        G93.3 G93.3 G93.3 G93.3
        5 G20(G70) G20 G20 G70
        G21(G71) G21 G21 G71
        6 G40 G40 G40 G40
        G41 G41 G41 G41
        G42 G42 G42 G42
        G41.2 G41.2 G41.2 G41.2
        G42.2 G42.2 G42.2 G42.2
        G41.3 G41.3 G41.3 G41.3
        G41.4 G41.4 G41.4 G41.4
        G42.4 G42.4 G42.4 G42.4
        G41.5 G41.5 G41.5 G41.5
        G42.5 G42.5 G42.5 G42.5
        G41.6 G40.3 G40.3 G40.3
        G42.6 G41.6 G41.6 G41.6
          G42.6 G42.6 G42.6
          G46.8 G46.8 G46.8
        7 G49(G49.1) G25 G25 G25
        G43 G26 G26 G26
        G44      
        G43.1      
        G43.4      
        G43.5      
        G43.2      
        G43.3      
        G43.8      
        G43.9      
        G43.7(G44.7)      
        G44.1      
        8 G80 G23 G23 G23
        G81 G22 G22 G22
        G82      
        G83      
        G84      
        G85      
        G86      
        G87      
        G88      
        G89      
        G73      
        G74      
        G76      
        G84.2      
        G84.3      
        G81.2      
        9 G98 G80 G80 G80
        G99 G83 G83 G83
          G84 G84 G84
          G85 G85 G85
          G86 G86 G86
          G87 G87 G87
          G88 G88 G88
          G89 G89 G89
          G81 G81 G81
          G82 G82 G82
          G83.1 G83.1 G83.1
          G84.2 G84.2 G84.2
          G83.5 G83.5 G83.5
          G87.5 G87.5 G87.5
          G83.6 G83.6 G83.6
          G87.6 G87.6 G87.6
          G86.1 G86.1 G86.1
          G84.1 G84.1 G84.1
        10 G50   G98 G98
        G51   G99 G99
        11 G67 G67 G67 G67
        G66 G66 G66 G66
        G66.1 G66.1 G66.1 G66.1
        12 G97      
        G96      
        13 G54(G54.1) G54(G54.1) G54(G54.1) G54(G54.1)
        G55 G55 G55 G55
        G56 G56 G56 G56
        G57 G57 G57 G57
        G58 G58 G58 G58
        G59 G59 G59 G59
        14 G64 G64 G64 G64
        G61 G61 G61 G61
        G62 G62 G62 G62
        G63 G63 G63 G63
        15 G69 G17 G17 G17
        G68      
        G68.2      
        G68.3      
        G68.4 G18 G18 G18
          G19 G19 G19
          G17.1 G17.1 G17.1
        16 G15 G69.1 G69.1 G69.1
        G16 G68.1 G68.1 G68.1
          G68.2 G68.2 G68.2
          G68.3 G68.3 G68.3
          G68.4 G68.4 G68.4
        17 G40.1(G150)   G50 G50
        G41.1(G151)   G51 G51
        G42.1(G152)      
        18 G25 G40.1 G40.1 G40.1
        G26 G41.1 G41.1 G41.1
          G42.1 G42.1 G42.1
        19 G160 G50.2(G250) G50.2(G250) G50.2(G250)
        G161 G51.2(G251) G51.2(G251) G51.2(G251)
        20 G13.1(G113) G13.1(G113) G13.1(G113) G13.1(G113)
        G12.1(G112) G12.1(G112) G12.1(G112) G12.1(G112)
        21 G50.1 G50.1 G50.1 G50.1
        G51.1 G51.1 G51.1 G51.1
        22 G54.2 G49(G49.1) G49(G49.1) G49(G49.1)
          G43 G43 G43
          G44 G44 G44
          G43.1 G43.1 G43.1
          G43.4 G43.4 G43.4
          G43.5 G43.5 G43.5
          G43.7(G44.7) G43.7(G44.7) G43.7(G44.7)
          G43.8 G43.8 G43.8
          G43.9 G43.9 G43.9
          G44.1 G44.1 G44.1
        23 G80.5 G15 G15 G15
        G81.5 G16 G16 G16
        24   G5.5 G5.5 G5.5
          G5.6 G5.6 G5.6
        25   G54.4 G54.4 G54.4
        26 G49.9 G80.5 G80.5 G80.5
        G44.9 G81.5 G81.5 G81.5
        27   G80.4(G80.8) G80.4(G80.8) G80.4(G80.8)
          G81.4(G81.4) G81.4(G81.4) G81.4(G81.4)
        28   G8.9 G8.9 G8.9
          G8.8 G8.8 G8.8
        29 G54.3 G5.7 G5.7 G5.7
          G5.8 G5.8 G5.8
        30 G50.2 G10.3 G10.3 G10.3
        G51.2 G10.4 G10.4 G10.4
          G10.5 G10.5 G10.5
        31 G5.5      
        G5.6      
        32 G54.4      
        33 G80.4(G80.8)      
        G81.4(G81.8)      
        34 G13      
        G12      
        35 G8.9      
        G8.8      
        36 G5.7      
        G5.8      

      The following data are set in the ODBGCD structure.

      group
      The group number which was specified by "type" is stored.
      flag
      The following flag is stored.
      #3 = 1 : command differ from the previous block
      #7 = 1 : There is a command in the present block.
      code
      G code is stored as a character string (ASCII).

      For example, the following result is gotten by calling this function during executing N100's block of the next machining program.

      N090 G18 ;
      N100 G01 Z100. ;
      N110 G17 G02 X10. Y-20. R12. ;
      type block code flag Modal status
      0 1 G01\0 0x0080 G01 is commanded.
      0 2 G02\0 0x0080 G02 is commanded.
      1 1 G18\0 0x0000 G18 mode. (not commanded)
      1 2 G17\0 0x0080 G17 is commanded.

    • Reading all data at a time
    • Specify the number of G code to be read for "num_gcd". Specify -1 for "type". Specify the block to be read for "block". Then G code which is selected in the objective block specified by "block" is set in the ODBGCD structure. Specify 21 for "num_gcd" in order to read all groups of G code. The number of G code which were read actually is stored in "num_gcd" after the function call.

    (2) Reading one shot G code

    • Reading data one by one
    • Specify 1 for "num_gcd". Specify G code group in the following table for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".

      When no one shot G code is commanded in the objective block specified by "block", zero is set in "num_gcd".

        M Series T Series
        type G code G code
        SystemA
        G code
        SystemB
        G code
        SystemC
        100 G4 G4 G4 G4
        G10 G27 G27 G27
          G28 G28 G28
          G29 G29 G29
        G27 G30 G30 G30
        G28 G50 G92 G92
        G29 G70 G70 G72
        G30 G71 G71 G73
          G72 G72 G74
        G39 G73 G73 G75
          G74 G74 G76
          G75 G75 G77
          G76 G76 G78
          G10 G10 G10
        G92 G37.1 G37.1 G37.1
          G37(G37.2) G37(G37.2) G37(G37.2)
        G31(G31.1) G31 G31 G31
        G60 G65 G65 G65
        G65      
          G5 G5 G5
        G5 G11 G11 G11
        G11 G7.1(G107) G7.1(G107) G7.1(G107)
        G52 G52 G52 G52
               
        G37 G30.1 G30.1 G30.1
        G7.1(G107) G10.6 G10.6 G10.6
        G30.1 G50.3 G92.1 G92.1
        G10.6 G8 G8 G8
        G72.1 G100 G110 G101
        G72.2 G39 G39 G39
        G92.1 G60 G60 G60
        G8      
          G31.8 G31.8 G31.8
        G70.7      
        G71.7      
        G72.7      
        G73.7      
        G74.7      
        G75.7      
        G76.7      
          G37.3 G37.3 G37.3
          G31.9 G31.9 G31.9
          G10.9 G10.9 G10.9
        G81.1 G7 G7 G7
          G73.1 G73.1 G73.1
          G73.2 G73.2 G73.2
        G5.1 G81.1 G81.1 G81.1
        G7 G5.4 G5.4 G5.4
        G31.8      
        G31.9      
        G12.4 G82.4 G82.4 G82.4
        G13.4 G83.4 G83.4 G83.4
        G5.4 G84.4 G84.4 G84.4
        G10.9 G5.1 G5.1 G5.1
        G31.2 G72.1 G72.1 G72.1
        G31.3 G72.2 G72.2 G72.2
        G31.4      
        G91.1      
        G28.2      
        G30.2      
        G50.4 G50.4 G50.4 G50.4
        G50.5 G50.5 G50.5 G50.5
        G50.6 G50.6 G50.6 G50.6
        G51.4 G51.4 G51.4 G51.4
        G51.5 G51.5 G51.5 G51.5
        G51.6 G51.6 G51.6 G51.6
        G37.1 G91.1 G91.1 G91.1
        G37.2 G28.2 G28.2 G28.2
        G37.3 G30.2 G30.2 G30.2
        101 G9(G65.4) G9(G65.4) G9(G65.4) G9(G65.4)
        G96.1 G96.1 G96.1 G96.1
        G96.2 G96.2 G96.2 G96.2
        G96.3 G96.3 G96.3 G96.3
        G96.4 G96.4 G96.4 G96.4
        G22.2 G22.2 G22.2 G22.2
        G52.1 G52.1 G52.1 G52.1
        G52.2 G52.2 G52.2 G52.2
        G52.3 G52.3 G52.3 G52.3
        G0.1 G0.1 G0.1 G0.1
        G5.9 G5.9 G5.9 G5.9
        102 G53 G53 G53 G53
        G53.1 G53.1 G53.1 G53.1
        G53.6 G53.6 G53.6 G53.6
        G53.2 G53.2 G53.2 G53.2
        G53.7 G53.7 G53.7 G53.7
        103 G38 G38 G38 G38
        G45 G41.8 G41.8 G41.8;
        G46 G42.8 G42.8 G42.8
        G47      
        G48      
        G10.8 G10.8 G10.8 G10.8
          G91.2 G91.2 G91.2

      The following data are set in the ODBGCD structure.

      group
      The group number which was specified by "type" is stored.
      flag
      The following flag is stored.
      #3 = 1 : command differ from the previous block (only Series 30i, 0i-D/F), PMi-A
      #4 = 1 : There is a command of a decimal point.
      #5 = 1 : Negative
      #6 = 1 : 1 digit
      #7 = (always)1 : There is a command in the present block.
      code
      For example, the following result is gotten by calling this function during executing N100's block of the next machining program.

    • Reading all data at a time
    • Specify the number of one shot G code to be read for "num_gcd". Specify -2 for "type". Specify the block to be read for "block". Then one shot G code which is commanded in the objective block specified by "block" is set in the ODBGCD structure. Specify 4 for "num_gcd" in order to read all groups of one shot G code. The number of G code which were read actually is stored in "num_gcd" after the function call.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of G code data to be read (*num_gcd) is wrong.
    EW_NUMBER Data number error
    The specification of G code group (type) is wrong.
    EW_ATTRIB Data attribute error
    The specification of block (block) is wrong.

    misc\cnc_rdlenofs

    Reads the mode and vector of the tool length compensation.

    These are stored in each member of ODBLOFS structure.

    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlenofs(unsigned short FlibHndl, ODBLOFS *lenofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    lenofs out

    Pointer to the ODBLOFS structure for the data of the tool length compensation. The ODBLOFS structure is as follows.

    typedef struct odblofs {
        short   mode;               /* offset mode     */
        long    ofsvct[MAX_AXIS];   /* offset vector   */
    } ODBLOFS ;     /* MAX_AXIS : max. controlled axes */
    
    mode
    Mode of the tool length compensation is set.
    0 : cancel mode
    1 : offset mode
    * In case of '0', 'ofsvct' is invalid.
    ofsvct
    The vector of the tool length compensation is set. The data for current controlled axes are valid.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15T/15TT.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_rdmdlconfig

    Reads the module configuration of CNC system.

    These information are stored in each member of ODBMDLC.

    Reading the data which depends on the path needs exchanging the path.

    This function is only available for Series 16/18 MODEL-C.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmdlconfig(unsigned short FlibHndl, ODBMDLC *mdlconfig);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mdlconfig out

    Pointer to the ODBMDLC structure for the module configuration of CNC system.The ODBMDLC structure is as follows.

    - The ODBMDLC structure for Series 16/18 is as follows.
    typedef struct odbmdlc {
         short   from;          /* Capacity of FROM module                                  */
         short   dram;          /* Capacity of DRAM module                                  */
         short   sram;          /* Capacity of additional SRAM module                       */
         short   pmc;           /* Type of PMC module                                       */
         short   crtc;          /* Type of CRTC module                                      */
         short   servo12;       /* Existence of servo module(axis1,2)                       */
         short   servo34;       /* Existence of servo module(axis3,4)                       */
         short   servo56;       /* Existence of servo module(axis5,6)                       */
         short   servo78;       /* (reserve)                                                */
         short   sic;           /* Existence of SIC                                         */
         short   pos_lsi;       /* Existence of POSITION LSI                                */
         short   hi_aio;        /* Existence of high-speed skip & analog I/O                */
         short   reserve1[12];  /* (reserve)                                                */
    
         /* Above items depend on each path.              */
         /* Following items are independent of each path. */
    
         short   drmmrc;        /* Capacity of Extended DRAM for management software(PMC-SC) */
         short   drmarc;        /* Capacity of DRAM for application(PMC-SC)                  */
         short   pmcmrc;        /* Type of PMC module(PMC-SC)                                */
         short   dmaarc;        /* Existence of additional board for DMA(PMC-SC)             */
         short   iopt;          /* Number of DI/DO points(I/O card)                          */
         short   hdiio;         /* Existence of LSI for high-speed skip(I/O card)            */
         short   gm2gr1;        /* Existence of graphic engine 2                             */
         short   crtgr2;        /* Type of CRTC module(OPT-1)                                */
         short   gm1gr2;        /* Existence of graphic module1(OPT-1)                       */
         short   gm2gr2;        /* Existence of graphic module2(OPT-1)                       */
         short   cmmrb;         /* Existence of communication module(OPT-1)                  */
         short   sv5axs;        /* Existence of servo module(axis5,6)(axis card)             */
         short   sv7axs;        /* Existence of servo module(axis7,8)(axis card)             */
         short   sicaxs;        /* Existence of SIC(axis card)                               */
         short   posaxs;        /* Existence of POSITION LSI(axis card)                      */
         short   hamaxs;        /* Existence of high-speed skip & analog I/O(axis card)      */
         short   romr64;        /* Capacity of system EPROM module(64bitRISC)                */
         short   srmr64;        /* Capacity of SRAM module(64bitRISC)                        */
         short   dr1r64;        /* Capacity of DRAM module1(64bitRISC)                       */
         short   dr2r64;        /* Capacity of DRAM module2(64bitRISC)                       */
         short   iopio2;        /* Number of DI/DO points(I/O card#2)                        */
         short   hdiio2;        /* Existence of LSI for high-speed skip(I/O card#2)          */
         short   cmmrb2;        /* Existence of communication module(OPT-1#2)                */
         short   romfap;        /* Existence of system EPROM module(CAP2)                    */
         short   srmfap;        /* Capacity of SRAM module(CAP2)                             */
         short   drmfap;        /* Capacity of DRAM module(CAP2)                             */
         short   drmare;        /* Capacity of DRAM for application(PMC-SE)                  */
         short   pmcmre;        /* Type of PMC module(PMC-SE)                                */
         short   dmaare;        /* Existence of additional board for DMA(PMC-SE)             */
         short   frmbgg;        /* Capacity of FROM module(BG-GRPH)                          */
         short   drmbgg;        /* Capacity of DRAM module(BG-GRPH)                          */
         short   asrbgg;        /* Capacity of additional SRAM module(BG-GRPH)               */
         short   edtpsc;        /* Version of module(PMC-SB5/SB6)                            */
         short   slcpsc;        /* Existence of SLC(PMC-SB5/SB6)                             */
         short   reserve2[34];  /* (reserve)                                                 */
    } ODBMDLC ;
    
    from
    Capacity of FROM module
    -1 : Not exist 10 : 6 (MB)
    0 : (reserve) 11 : 8 (MB)
    1 : 2 (MB) 12 : 10 (MB)
    2 : 4 (MB) 13 : 12 (MB)
    3 : 6 (MB) 14 : 14 (MB)
    4 : 8 (MB) 15 : 1 (MB)
    5 : 10 (MB) 16 : 1 (MB)
    6 : 12 (MB) 17 : (reserve)
    7 : 4 (MB) 18 : 4 (MB)
    8 : 3 (MB) 19 : 8 (MB)
    9 : 2 (MB)
    dram
    Capacity of DRAM module
    -1 : Not exist 4 : 16 (MB)
    0 : 4 (MB) 5 : 8 (MB)
    1 : 2 (MB) 6 : 4 (MB)
    2 : 1 (MB) 7 : 24 (MB)
    3 : 6 (MB)
    sram
    Capacity of additional SRAM module
    -1 : Not exist 5 : 768 (KB)
    0 : 1 (MB) 6 : (reserve)
    1 : 512 (KB) 7 : 2.25(MB)
    2 : 2 (MB) 8 : (reserve)
    3 : (reserve) 9 : 256 (KB)
    4 : (reserve)
    pmc
    Type of PMC module
    -1 : Not exist 2 : PMP2+SLC
    0 : BOC2 3 : BSI
    1 : BSI+SLC 4 : PMP2
    crtc
    Type of CRTC module
    -1 : Not exist 3 : HSSB-VGA
    0 : 14"CRT 4 : (reserve)
    1 : 9"CRT 5 : 9"VGA
    2 : VGA
    servo12
    Existence of servo module(axis1,2)
    -1 : Not exist 0 : Exists
    servo34
    Existence of servo module(axis3,4)
    -1 : Not exist 0 : Exists
    servo56
    Existence of servo module(axis5,6)
    -1 : Not exist 0 : Exists
    sic
    Existence of SIC
    -1 : Not exist 0 : Exists
    pos_lsi
    Existence of POSITION LSI
    -1 : Not exist 0 : Exists
    hi_aio
    Existence of high-speed skip & analog I/O
    -1 : Not exist 1 : only high-speed skip
    0 : Both exist 2 : only analog I/O
    drmmrc
    Capacity of additional DRAM for management software (PMC-SC)
    -1 : Not exist 0 : Exists
    drmarc
    Capacity of DRAM for application (PMC-SC)
    -1 : Not exist 2 : 512(KB)
    0 : 2(MB) 3 : 1(MB)
    1 : (reserve)
    pmcmrc
    Type of PMC module(PMC-SC)
    -1 : Not exist 2 : PMP2+SLC
    0 : BOC2 3 : BSI
    1 : BSI+SLC 4 : PMP2
    dmaarc
    Existence of additional board for DMA (PMC-SC)
    -1 : Not exist 0 : Exists
    iopt
    Number of DI/DO points (I/O card)
    -1 : Not exist 2 : 80/ 56
    0 : 144/112 3 : 104/ 72
    1 : 40/ 40 4 : 156/120
    hdiio
    Existence of LSI for high-speed skip (I/O card)
    -1 : Not exist 0 : Exists
    gm2gr1
    Existence of graphic engine 2
    -1 : Not exist 0 : Exists
    crtgr2
    Type of CRTC module (OPT-1)
    -1 : Not exist 3 : (reserve)
    0 : 14" CRT 4 : 14" CRT GRPH
    1 : 9" CRT 5 : 9" CRT GRPH
    2 : VGA MAIN 6 : VGA GRPH
    gm1gr2
    Existence of graphic module 1 (OPT-1)
    -1 : Not exist 0 : Exists
    gm2gr2
    Existence of graphic module 2 (OPT-1)
    -1 : Not exist 0 : Exists
    cmmrb
    Existence of communication module (OPT-1)
    -1 : Not exist 0 : Exists
    sv5axs
    Existence of servo module (axis5,6) (axis card)
    -1 : Not exist 0 : Exists
    sv7axs
    Existence of servo module (axis7,8) (axis card)
    -1 : Not exist 0 : Exists
    sicaxs
    Existence of SIC (axis card)
    -1 : Not exist 0 : Exists
    posaxs
    Existence of POSITION LSI (axis card)
    -1 : Not exist 0 : Exists
    hamaxs
    Existence of high-speed skip & analog I/O (axis card)
    -1 : Not exist 1 : only high-speed skip
    0 : Both exist 2 : only analog I/O
    romr64
    Capacity of system EPROM module (64bitRISC)
    -1 : Not exist 3 : 512 (KB)
    0 : 4 (MB) 4 : 256 (KB)
    1 : 2 (MB) 5 : 128 (KB)
    2 : 1 (MB) 6 : 768 (KB)
    srmr64
    Capacity of SRAM module (64bitRISC)
    -1 : Not exist 3 : 512 (KB)
    0 : 4 (MB) 4 : 256 (KB)
    1 : 2 (MB) 5 : 128 (KB)
    2 : 1 (MB) 6 : 768 (KB)
    dr1r64
    Capacity of DRAM module 1 (64bitRISC)
    -1 : Not exist 2 : 2 (MB)
    0 : (reserve) 3 : 4 (MB)
    1 : (reserve)
    dr2r64
    Capacity of DRAM module 2 (64bitRISC)
    -1 : Not exist 2 : 2 (MB)
    0 : (reserve) 3 : 4 (MB)
    1 : (reserve)
    iopio2
    Number of DI/DO points(I/O card#2)
    -1 : Not exist 2 : 80/ 56
    0 : 144/112 3 : 104/ 72
    1 : 40/ 40 4 : 156/120
    hdiio2
    Existence of LSI for high-speed skip (I/O card#2)
    -1 : Not exist 0 : Exists
    cmmrb2
    Existence of communication module (OPT-1#2)
    -1 : Not exist 0 : Exists
    romfap
    Existence of system EPROM module (CAP2)
    -1 : Not exist 3 : 512 (KB)
    0 : (reserve) 4 : 256 (KB)
    1 : (reserve) 5 : 128 (KB)
    2 : 1 (MB) 6 : 768 (KB)
    srmfap
    Capacity of SRAM module (CAP2)
    -1 : Not exist 3 : 512 (KB)
    0 : (reserve) 4 : 256 (KB)
    1 : (reserve) 5 : 128 (KB)
    2 : 1 (MB) 6 : 768 (KB)
    drmfap
    Capacity of DRAM module (CAP2)
    -1 : Not exist 3 : 512 (KB)
    0 : 2 (MB) 4 : 256 (KB)
    1 : 1.5(MB) 5 : 128 (KB)
    2 : 1 (MB) 6 : (reserve)
    drmare
    Capacity of DRAM for applications (PMC-SE)
    -1 : Not exist 2 : 512(KB)
    0 : 2(MB) 3 : 1(MB)
    pmcmre
    Type of PMC module (PMC-SE)
    -1 : Not exist 2 : PMP2+SLC
    0 : BOC2 3 : BSI
    1 : BSI+SLC 4 : PMP2
    dmaare
    Existence of additional board for DMA (PMC-SE)
    -1 : Not exist 0 : Exists
    frmbgg
    Capacity of FROM module (BG-GRAPH)
    -1 : Not exist 10 : 6 (MB)
    0 : (reserve) 11 : 8 (MB)
    1 : 2 (MB) 12 : 10 (MB)
    2 : 4 (MB) 13 : 12 (MB)
    3 : 6 (MB) 14 : 14 (MB)
    4 : 8 (MB) 15 : 1 (MB)
    5 : 10 (MB) 16 : 1 (MB)
    6 : 12 (MB) 17 : (reserve)
    7 : 4 (MB) 18 : 4 (MB)
    8 : 3 (MB) 19 : 8 (MB)
    9 : 2 (MB)
    drmbgg
    Capacity of DRAM module (BG-GRAPH)
    -1 : Not exist 4 : 16 (MB)
    0 : 4 (MB) 5 : 8 (MB)
    1 : 2 (MB) 6 : 4 (MB)
    2 : 1 (MB) 7 : 24 (MB)
    3 : 6 (MB)
    asrbgg
    Capacity of additional SRAM module (BG-GRPH)
    -1 : Not exist 5 : 768 (KB)
    0 : 1 (MB) 6 : (reserve)
    1 : 512 (KB) 7 : 2.25(MB)
    2 : 2 (MB) 8 : (reserve)
    3 : (reserve) 9 : 256 (KB)
    4 : (reserve)
    edtpsc
    Version of module (PMC-SB5/SB6)
    -1 : Not exist 0,...,F : Version
    slcpsc
    Existence of SLC (PMC-SB5/SB6)
    -1 : Not exist 0 : Exists

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_rdmdlconfig2

    Reads the module configuration of CNC system.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmdlconfig2(unsigned short FlibHndl, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data out

    Pointer to the character array for the module configuration of CNC system.

    The 128 bytes array is necessary to store them, and if its size is less than 128 bytes, the behavior of this function is not guaranteed.

    Description of data as follows.


    • Series 15i
    • As for description of each ID, see "Maintenance Manual" of the each CNC. If the value of ID is -1, it means that module does not exist.

      data[0]
      ID of FROM DIMM (MAIN)
      data[1]
      ID of DRAM DIMM (MAIN)
      data[2]
      ID of SRAM DIMM (MAIN)
      data[3]
      ID of CPU card (MAIN)
      data[4]
      ID of graphic card (MAIN)
      data[5]
      ID of servo card (MAIN)
      data[6]
      ID of PMC CPU (MAIN)
      data[7]
      ID of servo card 1 (Additional axis)
      data[8]
      ID of servo card 2 (Additional axis)
      data[9],..,data[127]
      reserve

    • Series 16-B/18-B
    • data[0]
      Capacity of FROM module (MAIN)
      -1: Not exist 9 : 2 MB
      0 : reserve 10 : 6 MB
      1 : 2 MB 11 : 8 MB
      2 : 4 MB 12 : 10 MB
      3 : 6 MB 13 : 12 MB
      4 : 8 MB 14 : 14 MB
      5 : 10 MB 15 : 1 MB
      6 : 12 MB 16 : 1 MB
      7 : 4 MB 17 : 4 MB
      8 : 3 MB 18 : 8 MB
      data[1]
      Capacity of DRAM module (MAIN)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[2]
      Capacity of additional SRAM module (MAIN)
      -1 : Not exist 5 : 768 KB
      0 : 1 MB 6 : reserve
      1 : 512 KB 7 : 2.25 MB
      2 : 2 MB 8 : reserve
      3 : reserve 9 : 256 KB
      4 : reserve
      data[3]
      Type of PMC module (MAIN)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[4]
      Type of CRTC module (MAIN)
      -1 : Not exist 3 : reserve
      0 : 14"CRT 4 : reserve
      1 : 9"CRT 5 : 9"VGA
      2 : VGA
      data[5]
      Existence of servo module(axis1,2)(MAIN)
      0 : Exists -1 : Not exist
      data[6]
      Existence of servo module(axis3,4)(MAIN)
      0 : Exists -1 : Not exist
      data[7]
      Existence of SIC(MAIN)
      0 : Exists -1 : Not exist
      data[8]
      Existence of POSITION LSI(MAIN)
      0 : Exists -1 : Not exist
      data[9]
      Existence of additional DRAM for management software(PMC-SC)
      0 : Exists -1 : Not exist
      data[10]
      Existence of DRAM for application(PMC-SC)
      -1 : Not exist 2 : 512 KB
      0 : 2 MB 3 : 1 MB
      1 : reserve
      data[11]
      Type of PMC module(PMC-SC)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[12]
      Capacity of FROM module(PMC-SC)
      0 : Exists -1 : Not exist
      data[13]
      Number of DI/DO points (I/O card)
      1 : reserve 2 : 80/56
      0 : 144/112 3 : 104/72
      1 : 40/40 4 : 156/120
      data[14]
      Existence of LSI for high-speed skip (I/O card,M-NET)
      0 : Exists -1 : Not exist
      data[15]
      Capacity of FROM moduleCapacity of FROM module (SUB)
      -1 : Not exist 8 : 3 MB
      0 : reserve 9 : 2 MB
      1 : 2 MB 10 : 6 MB
      2 : 4 MB 11 : 8 MB
      3 : 6 MB 12 : 10 MB
      4 : 8 MB 13 : 12 MB
      5 : 10 MB 14 : 14 MB
      6 : 12 MB 15 : 1 MB
      7 : 4 MB 16 : 1 MB
      data[16]
      Capacity of DRAM module (SUB)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[17]
      Capacity of additional SRAM module (SUB)
      -1 : Not exist 5 : 768 KB
      0 : 1 MB 6 : reserve
      1 : 512 KB 7 : 2.25 MB
      2 : 2 MB 8 : reserve
      3 : reserve 9 : 256 KB
      4 : reserve
      data[18]
      Existence of servo module(axis1,2)(SUB)
      0 : Exists -1 : Not exist
      data[19]
      Existence of servo module(axis3,4)(SUB)
      0 : Exists -1 : Not exist
      data[20]
      Existence of SIC (SUB)
      0 : Exists -1 : Not exist
      data[21]
      Existence of POSITION LSI(SUB)
      0 : Exists -1 : Not exist
      data[22]
      Existence of high-speed skip & analog I/O (SUB)
      1 : Not existし 1 : only high-speed skip
      0 : Both exist 2 : only analog I/O
      data[23]
      Existence of graphic engine 2(MAIN)
      0 : Exists -1 : Not exist
      data[24]
      Type of CRTC module(OPT-1)
      -1 : Not exist 3 : reserve
      0 : 14"CRT MAIN 4 : 14"CRT GRPH
      1 : 9"CRT MAIN 5 : 9"CRT GRPH
      2 : VGA MAIN 6 : VGA GRPH
      data[25]
      Existence of graphic module 1(OPT-1)
      0 : Exists -1 : Not exist
      data[26]
      Existence of graphic module 2 (OPT-1)
      0 : Exists -1 : Not exist
      data[27]
      Existence of communication module(OPT-1)
      0 : Exists -1 : Not exist
      data[28]
      Existence of servo module(axis1,2) (axis card)
      0 : Exists -1 : Not exist
      data[29]
      Existence of servo module(axis3,4) (axis card)
      0 : Exists -1 : Not exist
      data[30]
      Existence of SIC (axis card)
      0 : Exists -1 : Not exist
      data[31]
      Existence of POSITION LSI (axis card)
      0 : Exists -1 : Not exist
      data[32]
      Existence of high-speed skip & analog I/O (axis card)
      1 : Not exist 1 : only high-speed skip
      0 : Both exist 2 : only analog I/O
      data[33],..,data[38]
      reserved
      data[39]
      Capacity of system EPROM module (64bitRISC)
      -1 : Not exist 3 : 512 KB
      0 : 4 MB 4 : 256 KB
      1 : 2 MB 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[40]
      Capacity of SRAM (64bitRISC)
      -1 : Not exist 3 : 512 KB
      0 : 4 MB 4 : 256 KB
      1 : 2 MB 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[41]
      Capacity of DRAM module 1 (64bitRISC)
      -1 : Not exist 2 : 2 MB
      0 : reserve 3 : 4 MB
      1 : reserve
      data[42]
      Capacity of DRAM module 2 (64bitRISC)
      -1 : Not exist 2 : 2 MB
      0 : reserve 3 : 4 MB
      1 : reserve
      data[43]
      Number of DI/DO points (I/O card#2)
      -1 : Not exist 2 : 80/56
      0 : 144/112 3 : 104/72
      1 : 40/40 4 : 156/120
      data[44]
      Existence of LSI for high-speed skip (I/O card#2)
      0 : Exists -1 : Not exist
      data[45]
      Existence of communication module (OPT-1#2)
      0 : Exists -1 : Not exist
      data[46]
      Capacity of system EPROM module (CAP2)
      -1 : Not exist 3 : 512 KB
      0 : reserve 4 : 256 KB
      1 : reserve 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[47]
      Capacity of SRAM module (CAP2)
      -1 : Not exist 3 : 512 KB
      0 : reserve 4 : 256 KB
      1 : reserve 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[48]
      Capacity of DRAM module (CAP2)
      -1 : Not exist 3 : 512 KB
      0 : 2 MB 4 : 256 KB
      1 : 1.5 MB 5 : 128 KB
      2 : 1 MB
      data[49]
      Capacity of FROM module (LC)
      -1 : Not exist 8 : 3 MB
      0 : reserve 9 : 2 MB
      1 : 2 MB 10 : 6 MB
      2 : 4 MB 11 : 8 MB
      3 : 6 MB 12 : 10 MB
      4 : 8 MB 13 : 12 MB
      5 : 10 MB 14 : 14 MB
      6 : 12 MB 15 : 1 MB
      7 : 4 MB 16 : 1 MB
      data[50]
      Capacity of DRAM module (LC)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[51]
      Type of PMC module (LC)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[52]
      Existence of servo module(axis1,2) (LC)
      0 : Exists -1 : Not exist
      data[53]
      Existence of servo module(axis3,4) (LC)
      0 : Exists -1 : Not exist
      data[54]
      Capacity of DRAM for application (PMC-SE)
      -1 : Not exist 2 : 512 KB
      0 : 2 MB 3 : 1 MB
      1 : reserve
      data[55]
      TYPE of PMC module (PMC-SE)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[56]
      Capacity of FROM module(PMC-SE)
      0 : Exists -1 : Not exist
      data[57]
      Existence of servo module(axis5,6) (MAIN)
      0 : Exists -1 : Not exist
      data[58]
      Capacity of FROM module (BG-GRAPH)
      -1 : Not exist 8 : 3 MB
      0 : reserve 9 : 2 MB
      1 : 2 MB 10 : 6 MB
      2 : 4 MB 11 : 8 MB
      3 : 6 MB 12 : 10 MB
      4 : 8 MB 13 : 12 MB
      5 : 10 MB 14 : 14 MB
      6 : 12 MB 15 : 1 MB
      7 : 4 MB 16 : 1 MB
      data[59]
      Capacity of DRAM module (BG-GRAPH)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[60]
      Capacity of additional SRAM module (BG-GRPH)
      -1 : Not exist 5 : 768 KB
      0 : 1 MB 6 : reserve
      1 : 512 KB 7 : 2.25 MB
      2 : 2 MB 8 : reserve
      3 : reserve 9 : 256 KB
      4 : reserve
      data[61]
      Existence of servo module(axis5,6) (SUB)
      0 : Exists -1 : Not exist
      data[62],..,data[127]
      reserved

    • Series 16-C/18-C
    • data[0]
      Capacity of FROM module (MAIN)
      -1 : Not exist 10 : reserve
      0 : reserve 11 : reserve
      1 : 2 MB 12 : reserve
      2 : 4 MB 13 : reserve
      3 : 6 MB 14 : reserve
      4 : 8 MB 15 : reserve
      5 : reserve 16 : reserve
      6 : reserve 17 : 12 MB
      7 : reserve 18 : 4 MB
      8 : reserve 19 : 8 MB
      9 : reserve
      data[1]
      Capacity of DRAM module (MAIN)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[2]
      Capacity of additional SRAM module (MAIN)
      -1 : Not exist 5 : 768 KB
      0 : reserve 6 : reserve
      1 : reserve 7 : 2.25 MB
      2 : reserve 8 : reserve
      3 : reserve 9 : 256 KB
      4 : reserve
      data[3]
      reserved
      data[4]
      Type of CRTC module (MAIN)
      -1 : Not exist 3 : HSSB-VGA
      0 : 14"CRT 4 : reserve
      1 : 9"CRT 5 : 9"VGA
      2 : VGA
      data[5]
      Existence of servo module(axis1,2) (MAIN)
      0 : Exists -1 : Not exist
      data[6]
      Existence of servo module(axis3,4) (MAIN)
      0 : Exists -1 : Not exist
      data[7]
      Existence of SIC (MAIN)
      0 : Exists -1 : Not exist
      data[8]
      Existence of POSITION LSI (MAIN)
      0 : Exists -1 : Not exist
      data[9]
      Existence of additional DRAM for management software (PMC-SC)
      0 : Exists -1 : Not exist
      data[10]
      Capacity of DRAM for application (PMC-SC)
      -1 : Not exist 2 : 512 KB
      0 : 2 MB 3 : 1 MB
      1 : reserve
      data[11]
      Type of PMC module (PMC-SC)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[12]
      Capacity of FROM module (PMC-SC)
      0 : Exists -1 : Not exist
      data[13]
      Existence of DI/DO points (I/O card)
      -1 : Not exist 2 : 80/56
      0 : 144/112 3 : 104/72
      1 : 40/40 4 : 156/120
      data[14]
      Existence of LSI for high-speed skip (I/O card)
      0 : Exists -1 : Not exist
      data[15]
      Capacity of FROM module (SUB)
      -1 : Not exist 10 : reserve
      0 : reserve 11 : reserve
      1 : 2 MB 12 : reserve
      2 : 4 MB 13 : reserve
      3 : 6 MB 14 : reserve
      4 : 8 MB 15 : reserve
      5 : reserve 16 : reserve
      6 : reserve 17 : 12 MB
      7 : reserve 18 : 4 MB
      8 : reserve 19 : 8 MB
      9 : reserve
      data[16]
      Capacity of DRAM module (SUB)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[17]
      Capacity of additional SRAM module (SUB)
      -1 : Not exist 5 : 768KB
      0 : reserve 6 : reserve
      1 : reserve 7 : 2.25MB
      2 : reserve 8 : reserve
      3 : reserve 9 : 256KB
      4 : reserve
      data[18]
      Existence of servo module(axis1,2) (SUB)
      0 : Exists -1 : Not exist
      data[19]
      Existence of servo module(axis3,4) (SUB)
      0 : Exists -1 : Not exist
      data[20]
      Existence of SIC (SUB)
      0 : Exists -1 : Not exist
      data[21]
      Existence of POSITION LSI (SUB)
      0 : Exists -1 : Not exist
      data[22]
      Existence of high-speed skip & analog I/O (SUB)
      -1 : Not exist 1 : only high-speed skip
      0 : Both exist 2 : only analog I/O
      data[23]
      reserved
      data[24]
      Type of CRTC module (OPT-1)
      -1 : Not exist 3 : reserve
      0 : 14"CRT MAIN 4 : 14"CRT GRPH
      1 : 9"CRT MAIN 5 : 9"CRT GRPH
      2 : VGA MAIN 6 : VGA GRPH
      data[25]
      Existence of graphic module 1 (OPT-1)
      0 : Exists -1 : Not exist
      data[26]
      Existence of graphic module 2 (OPT-1)
      0 : Exists -1 : Not exist
      data[27]
      Existence of communication module (OPT-1)
      0 : Exists -1 : Not exist
      data[28]
      Existence of servo module(axis1,2) (axis card)
      0 : Exists -1 : Not exist
      data[29]
      Existence of servo module(axis3,4) (axis card)
      0 : Exists -1 : Not exist
      data[30]
      Existence of SIC (axis card)
      0 : Exists -1 : Not exist
      data[31]
      Existence of POSITION LSI
      0 : Exists -1 : Not exist
      data[32]
      Existence of high-speed skip & analog I/O (axis card)
      -1 : Not exist 1 : only high-speed skip
      0 : Both exist 2 : only analog I/O
      data[33],..,data[38]
      reserved
      data[39]
      Capacity of system EPROM module (64bitRISC)
      -1 : Not exist 3 : 512 KB
      0 : 4 MB 4 : 256 KB
      1 : 2 MB 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[40]
      Capacity of SRAM module (64bitRISC)
      -1 : Not exist 3 : 512 KB
      0 : 4 MB 4 : 256 KB
      1 : 2 MB 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[41]
      Capacity of DRAM module 1 (64bitRISC)
      -1 : Not exist 2 : 2 MB
      0 : reserve 3 : 4 MB
      1 : resreve
      data[42]
      Capacity of DRAM module 2 (64bitRISC)
      -1 : Not exist 2 : 2 MB
      0 : reserve 3 : 4 MB
      1 : reserve
      data[43]
      Number of DI/DO points (I/O card#2)
      -1 : Not exist 2 : 80/56
      0 : 144/112 3 : 104/72
      1 : 40/40 4 : 156/120
      data[44]
      Existence of LSI for high-speed skip (I/O card#2)
      0 : Exists -1 : Not exist
      data[45]
      Existence of communication module (OPT-1#2)
      0 : Exists -1 : Not exist
      data[46]
      Capacity of system EPROM module (CAP2)
      -1 : Not exist 3 : 512 KB
      0 : reserve 4 : 256 KB
      1 : reserve 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[47]
      Capacity of SRAM module(CAP2)
      -1 : Not exist 3 : 512 KB
      0 : reserve 4 : 256 KB
      1 : reserve 5 : 128 KB
      2 : 1 MB 6 : 768 KB
      data[48]
      Capacity of DRAM module(CAP2)
      -1 : Not exist 3 : 512 KB
      0 : 2 MB 4 : 256 KB
      1 : 1.5 MB 5 : 128 KB
      2 : 1 MB
      data[49]
      Capacity of FROM module (LC)
      -1 : Not exist 8 : 3 MB
      0 : reserve 9 : 2 MB
      1 : 2 MB 10 : 6 MB
      2 : 4 MB 11 : 8 MB
      3 : 6 MB 12 : 10 MB
      4 : 8 MB 13 : 12 MB
      5 : 10 MB 14 : 14 MB
      6 : 12 MB 15 : 1 MB
      7 : 4 MB 16 : 1 MB
      data[50]
      Capacity of DRAM module (LC)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[51]
      Type of PMC module (LC)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[52]
      Existence of servo module(axis1,2) (LC)
      0 : Exists -1 : Not exist
      data[53]
      Existence of servo module(axis3,4) (LC)
      0 : Exists -1 : Not exist
      data[54]
      Capacity of DRAM for application (PMC-SE)
      -1 : Not exist 2 : 512 KB
      0 : 2 MB 3 : 1 MB
      1 : reserve
      data[55]
      TYPE of PMC module (PMC-SE)
      -1 : Not exist 2 : PMP2+SLC
      0 : BOC2 3 : BSI
      1 : BSI+SLC 4 : PMP2
      data[56]
      Capacity of FROM module (PMC-SE)
      0 : Exists -1 : Not exist
      data[57]
      Existence of servo module(axis5/6) (MAIN)
      0 : Exists -1 : Not exist
      data[58]
      Capacity of FROM module (BG-GRAPH)
      -1 : Not exist 10 : reserve
      0 : reserve 11 : reserve
      1 : 2 MB 12 : reserve
      2 : 4 MB 13 : reserve
      3 : 6 MB 14 : reserve
      4 : 8 MB 15 : reserve
      5 : reserve 16 : reserve
      6 : reserve 17 : 12 MB
      7 : reserve 18 : 4 MB
      8 : reserve 19 : 8 MB
      9 : reserve
      data[59]
      Capacity of DRAM module (BG-GRAPH)
      -1 : Not exist 4 : 16 MB
      0 : 4 MB 5 : 8 MB
      1 : 2 MB 6 : 4 MB
      2 : 1 MB 7 : 24 MB
      3 : 6 MB
      data[60]
      Capacity of additional SRAM module (BG-GRPH)
      -1 : Not exist 5 : 768 KB
      0 : reserve 6 : reserve
      1 : reserve 7 : 2.25 MB
      2 : reserve 8 : reserve
      3 : reserve 9 : 256 KB
      4 : reserve
      data[61]
      Existence of servo module(axis5,6) (SUB)
      0 : Exists -1 : Not exist
      data[62]
      Version of module (PMC-SB5/SB6)
      0,..,15 : Version -1 : Not exist
      data[63]
      Existence of SLC (PMC-SB5/SB6)
      0 : Exists -1 : Not exist
      data[64],..,data[127]
      reserved

    • Series 16i/18i/21i, 0i-B, Power Mate i
    • As for description of each ID, see "Maintenance Manual" of the each CNC. If the value of ID is -1, it means that module does not exist.

      data[0]
      ID of FROM DIMM (MAIN)
      data[1]
      ID of DRAM DIMM (MAIN)
      data[2]
      ID of SRAM DIMM (MAIN)
      data[3]
      ID of CPU card (MAIN)
      data[4]
      ID of graphic card (MAIN)
      data[5]
      ID of servo card (MAIN)
      data[6]
      ID of PMC CPU (MAIN)
      data[7]
      ID of DRAM DIMM (SUB)
      data[8]
      ID of CPU card (SUB)
      data[9]
      ID of servo card (SUB)
      data[10]
      ID of DRAM DIMM (LC)
      data[11]
      ID of SRAM DIMM (LC)
      data[12]
      ID of CPU card (LC)
      data[13]
      ID of servo card (LC)
      data[14]
      ID of DRAM DIMM (PMC-SC)
      data[15]
      ID of CPU card (PMC-SC)
      data[16]
      ID of SRAM DIMM (PMC-SE)
      data[17]
      ID of DRAM DIMM (PMC-SE)
      data[18]
      ID of CPU card (PMC-SE)
      data[19]
      ID of SRAM DIMM (CAP2)
      data[20]
      ID of DRAM DIMM (CAP2)
      data[21]
      ID of CPU card (CAP2)
      data[22]
      ID of DRAM DIMM (RMT-BF,DNC1)
      data[23]
      ID of CPU card (RMT-BF,DNC1)
      data[24]
      ID of DRAM DIMM (RMT-BF,DNC1#2)
      data[25]
      ID of CPU card (RMT-BF,DNC1#2)
      data[26]
      ID of I/O board type (I/O Card)
      data[27]
      ID of I/O board type (I/O Card)
      data[28]
      ID of DRAM DIMM (Ethernet Board)
      data[29]
      ID of Hard disk (Ethernet Board)
      data[30]
      ID2 of servo card (MAIN)
      data[31]
      ID3 of servo card (MAIN)
      data[32]
      ID2 of servo card (SUB)
      data[33]
      ID3 of servo card (SUB)
      data[34]
      ID2 of servo card (LC)
      data[35]
      ID3 of servo card (LC)
      data[36],..,data[127]
      reserved

    • Series 21-B
    • data[0]
      Capacity of FROM module (MAIN)
      0 : 128 KB + 4 MB 4 : 256 KB + 4 MB
      1 : reserve 5 : reserve
      2 : 128 KB + 6 MB 6 : 256 KB + 6 MB
      3 : 128 KB + 2 MB 7 : 256 KB + 2 MB
      data[1]
      Capacity of SRAM module and type of spindle (MAIN)
      0 : SRAM 256 KB + SIC exist
      1 : SRAM 256 KB + POSITION LSI exist
      2 : SRAM 512 KB + SIC exist
      3 : SRAM 512 KB + POSITION LSI exist
      4 : SRAM 256 KB + SIC + POSITION LSIBoth exist
      5 : reserved
      6 : SRAM 512 KB + SIC + POSITION LSIBoth exist
      data[2]
      Existence of MATRIX DI/DO (MAIN)
      0 : Not exist 1 : Exists
      data[3]
      Type of PMC module (MAIN)
      -1 : Not exist 2 : PMP+SLC
      0 : BOC2 3 : BIT
      1 : BIT+SLC 4 : PMP
      data[4]
      Type of CRTC module (MAIN)
      0 : 14"VGA 2 : 7.2"VGA
      1 : 14"CRT 3 : 9"CRT
      data[5]
      reserved
      data[6]
      Existence of servo module(axis1+2,3+4) (MAIN)
      0 : axis1+2, axis3+4 exist
      1 : axis1+2 exists
      data[7]
      Existence of high-speed skip & analog I/O (MAIN)
      0 : Exists -1 : Not exist
      data[8]
      Existence of graphic module (MAIN)
      0 : Exists -1 : Not exist
      data[9],..,data[12]
      reserved
      data[13]
      Number of DI/DO points (MAIN)
      -1 : Not exist 1 : reserve
      0 : 96/64 2 : 48/32
      data[14],..,data[127]
      reserved

    • Series 0i-A
    • data[0]
      Capacity of FROM module (MAIN)
      0 : 4 MB
      1 : reserve
      2 : 6 MB
      3 : 2 MB
      data[1]
      Capacity of SRAM module and type of spindle (MAIN)
      0 : SRAM 256KB + SIC
      1 : SRAM 256KB + POSITION LSI
      2 : SRAM 512KB + SIC
      3 : SRAM 512KB + POSITION LSI
      4..7 : (reserved)
      data[2]
      reserved
      data[3]
      Type of PMC module (MAIN)
      -1 : Not exist 2 : PMP+SLC
      0 : BOC2 3 : BIT
      1 : BIT+SLC 4 : PMP
      data[4],..,data[5]
      reserved
      data[6]
      Existence of servo module(axis1+2,3+4) (MAIN)
      0 : axis1+2, axis3+4 exist
      1 : axis1+2 exists
      data[7]
      Existence of high-speed skip LSI (MAIN)
      0 : Exists -1 : Not exist
      data[8]
      Existence of graphic module (MAIN)
      0 : Exists -1 : Not exist
      data[9],..,data[12]
      reserved
      data[13]
      Number of DI/DO points (MAIN)
      -1 : Not exist 1 : reserve
      0 : 96/64 2 : 48/32
      data[14],..,data[127]
      reserved

    ERRORS

    Code Description

    misc\cnc_rdmenuswitch

    Reads the menu switch signals.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmenuswitch(unsigned short FlibHndl, short *menu);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    menu out

    The menu switch signals are set. The following bit for each signal is set to 0 or 1. The details are as follows.

    bit 0 : machine lock signal
    bit 1 : display lock signal
    bit 2 : single block signal
    bit 3 : dry run signal
    bit 4 : auxiliary function lock signal
    bit 5 : manual absolute signal
    bit 6 : Z axis neglect signal
    bit 7 : block delete signal 1
    bit 8 : block delete signal 2
    bit 9 : block delete signal 3
    bit 10 : block delete signal 4
    bit 11 : block delete signal 5
    bit 12 : block delete signal 6
    bit 13 : block delete signal 7
    bit 14 : block delete signal 8
    bit 15 : block delete signal 9

    If CNC does not have the additional optional block skip function, bit 8 through bit 15 are set to 0.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15TT.
    EW_NOOPT No option
    The menu switch option and the extended driver/library function are necessary.

    misc\cnc_rdmirimage

    Reads the mode of the programmable mirror image and the absolute position of center of mirror image.

    These are stored in each member of ODBMIR structure.

    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmirimage(unsigned short FlibHndl, ODBMIR *mirimg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mirimg out

    Pointer to the ODBMIR structure for the data of the programmable mirror image. The ODBMIR structure is as follows.

    typedef struct odbmir {
        short   mode;               /* mirror image mode       */
        long    mir_flag;           /* flag of mirror axis     */
        long    mir_pos[MAX_AXIS];  /* absolute pos. of center */
    } ODBMIR ;               /* MAX_AXIS : max.controlled axes */
    
    mode
    Mode of the programmable mirror image is set.
    0 : cancel mode
    1 : mirror image mode
    * In case of '0', the data except 'mode' is invalid.
    mir_flag
    Flag of mirror axis is set. The details are as follows.
    bit 0(1st axis) =0 : not mirror axis
    =1 : mirror axis
    bit 1(2st axis) =0 : not mirror axis
    =1 : mirror axis
    bit 2(3st axis) =0 : not mirror axis
    =1 : mirror axis
    :
    bit n-1(n axis) =0 : not mirror axis
    =1 : mirror axis
    * In case that some bit of 'mir_flag' is '0', 'mir_pos' of its axis is valid.
    mir_pos
    Absolute position of center of mirror is set. The data for current controlled axes are valid.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15TT.
    EW_NOOPT No option
    The programmable mirror image option and the extended driver/library function are necessary.

    misc\cnc_rdopmsg

    Reads the contents of the operator's message in CNC.

    The operator's message is stored in "data" of "OPMSG".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopmsg(unsigned short FlibHndl, short type, short length, OPMSG *opmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of operator's message.

  • Series 15/15i
  •  0 : 1st message
     1 : 2nd message
     2 : 3rd message
     3 : 4th message
     4 : macro message
    -1 : all messages

  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  •  0 : 1st message

  • Series 16i/18i-W
  •  0 : 1st message
     1 : 2nd message
     2 : 3rd message
     3 : 4th message
    -1 : all messages
    length in

    Specify the length of the data block(size of OPMSG structure)

  • Series 15/15i
  • single message (1st - 4th message)

    macro message

    all messages


  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A

  • Series 16i/18i-W
  • single message(1st - 4th message)

    all messages

    opmsg out

    Pointer to the OPMSG structure including the operator's message.

    typedef struct msg {
         short  datano ;         /* Number of operator's message */
         short  type ;           /* Kind of operator's message */
         short  char_num ;       /* Message length */
         char  data[MSG_SIZE] ;  /* Operator's message strings */
    } OPMSG ;                    /* MSG_SIZE : Message length */
    
    datano
    The number of operator's message is stored.
      • message exists
      • Series 15/15i
      • 0 to 999
      • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      • number does not exist : 0
        number exist : 2000 to 2099
      • message does not exist
      • -1
    type
    Kind of operator's message is stored.
    • Series 15/15i
      • 0 to 3 : 1st to 4th message
        4 : macro message
    • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      • 0 : 1st message
    • Series 16i/18i-W
      • 0 to 3 : 1st to 4th message
    char_num
    The operator's message length is stored.
    • Series 15/15i
      • 1 to 129 : 1st to 4th message
        1 to 27 : macro message
    • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      • 1 to 256 : operator's message
    data
    The operator's message strings are stored. The '\0' is set at the end of strings.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
    Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of operator's message.

     0 : 1st message

    length in

    Specify the length of the data block(size of OPMSG structure)


    opmsg out

    Pointer to the OPMSG structure including the operator's message.

    typedef struct msg {
         short  datano ;         /* Number of operator's message */
         short  type ;           /* Kind of operator's message */
         short  char_num ;       /* Message length */
         char  data[MSG_SIZE] ;  /* Operator's message strings */
    } OPMSG ;                    /* MSG_SIZE : Message length */
    
    datano
    The number of operator's message is stored.
      • message exists
      • number does not exist : 0
        number exist : 2000 to 2099
      • message does not exist
      • -1
    type
    Kind of operator's message is stored.
        0 : 1st message
    char_num
    The operator's message length is stored.
        1 to 256 : operator's message
    data
    The operator's message strings are stored. The '\0' is set at the end of strings.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of OPMSG structure(length) is wrong.
    EW_ATTRIB Data attribute error
    The specification of the kind of operator's message (type) is wrong.
    EW_NOOPT No option
    Set necessary CNC option.
    EW_PARAM CNC parameter error
    • Series 30i/31i/32i, 0i-D/F, PMi-A
    • CNC parameter '11931#1' must be 0.

    misc\cnc_rdopmsg2

    Reads the contents of the operator's message in CNC.

    The operator's message is stored in "data" of "OPMSG2".

    This function can be used in case of four external operator messages on Series 16/18/21, 16i/18i/21i, 0i, 30i and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopmsg2(unsigned short FlibHndl,short type,short length,OPMSG2 *opmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of operator's message.

    0 : 1st message
    1 : 2nd message
    2 : 3rd message
    3 : 4th message
    -1 : all messages
    length in

    Specify the length of the data block(size of OPMSG2 structure)

    single message(1st - 4th message)

    all messages

    opmsg out

    Pointer to the OPMSG2 structure including the operator's message.

    The OPMSG2 structure is as follows.
    typedef struct opmsg2 {
         short  datano ;         /* Number of operator's message */
         short  type ;           /* Kind of operator's message */
         short  char_num ;       /* Message length */
         char  data[MSG_SIZE] ;  /* Operator's message strings */
    } OPMSG2 ;                   /* MSG_SIZE : Message length */
    
    datano
    The number of operator's message is stored. message exists
      • message exists
      • number does not exist : 0
        number exist : 2000 to 2099
      • message does not exist
      • -1
    type
    Kind of operator's message is stored.
      0 to 3 : 1st to 4th message
    char_num
    The operator's message length is stored.
      1 to 64 : operator's message
    The '\0' at the end of strings is included in the length.
    data
    The operator's message strings are stored. The '\0' is set at the end of strings.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
    Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    Note3) Refer to "APPENDIX I Central & East European Character Code", "APPENDIX J West European Character Code List" of "C Language Executor PROGRAMMING MANUAL" for Western Europe code.

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of OPMSG2 structure(length) is wrong.
    EW_ATTRIB data attribute error
    The specification of the kind of operator's message(type) is wrong.
    EW_NOOPT no option
    Set necessary CNC option.
    EW_PARAM CNC parameter error
    • except Series 30i/31i/32i, 0i-D/F, PMi-A
    • CNC parameter '3207#0' must be 1.
    • Series 30i/31i/32i, 0i-D/F, PMi-A
    • CNC parameter '11931#1' must be 0.

    misc\cnc_rdopmsg3

    Reads the contents of the operator's message in CNC. The operator's message is stored in "data" of "opmsg".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopmsg3(unsigned short FlibHndl,short type, short *number, OPMSG3 *opmsg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of operator's message.
     0 : 1st message
     1 : 2nd message
     2 : 3rd message
     3 : 4th message
     4 : macro message
    5〜16 : 5th - 16th message(30i, 0i-D/F, PMi-A olny)
    -1 : all message
    In case of one operator's messages with the Series 16/18/21, 16i/18i/21i, 0i-A/B/C, if the values other than -1,0,4 are set, the error occurs.
    In case of four operator's messages with the Series 30i, 0i-D/F and PMi-A, if the values 5-16 are set, the error occurs.
    And, if four is specified for NC in which the macro message reading function is not provided, the error occurs.
    number in/out Specify the pointer to the number of message to be read.
    This function returns the number of message, which was read actually.
    Please specify "1" for type=0-4(type=0-16 30i, 0i-D/F, PMi-A).
    And when the type is "-1", specify "5" in case of 4 operator's messages and specify "17" in case of 16 operator's messages (30i, 0i-D/F, PMi-A only).
    opmsg out

    Pointer to the OPMSG3 structure including the operator's message. The OPMSG3 structure is as follows.

    typedef struct opmsg3 {
         short  datano ;         /* Number of operator's message */
         short  type ;           /* Kind of operator's message */
         short  char_num ;       /* Message length */
         char   data[MSG_SIZE] ; /* Operator's message strings */
    } OPMSG3;                    /* MSG_SIZE : Message length */
    
    datano
    The number of operator's message is stored.
    Judge the existence of the operator's message by message number of datano. (When the datano is -1, the operator's message does not exist).
      • message exists
      • Series 15/15i
      • 0〜999
      • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
      • number exist : 2000 to 2099
        number does not exist : 2100 to 2999
      • Series 30i, 0i-D/F, PMi-A
      • * In case of Parameter No.6301#1=0
        number exist : 2000 to 2099
        number does not exist : 2100 to 2999
        * In case of Parameter No.6301#1=1
        number exist : 0 - 99
        number does not exist : 100 - 4095
      • message does not exist
      • -1
    type
    Kind of operator's message is stored.
      0 to 3 : 1st to 4th message
      4 : macro message
      5 to 16 : 5th to 16th message(30i, 0i-D/F, PMi-A only)
    char_num
    The operator's message length is stored. The '\0' at the end of strings is included in the length.
    data
    The operator's message strings are stored. The '\0' is set at the end of strings.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe
    Note1) In CNC except Series 30i, 0i-D/F and PMi-A, messages except English and Japanese cannot be correctly acquired.
    Note2) Korean cannot be correctly acquired with FOCAS2/Ethernet.(Except 30i-B, 0i-D/F and PMi-A)
    Note3) Refer to "APPENDIX I Central & East European Character Code", "APPENDIX J West European Character Code List" of "C Language Executor PROGRAMMING MANUAL" for Western Europe code.
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the kind of operator's message.
     0 : 1st message
     1 : 2nd message
     2 : 3rd message
     3 : 4th message
     4 : macro message
    5 to 16 : 5th-16th message
    -1 : all message
    number in/out Specify the pointer to the number of message to be read.
    This function returns the number of message which was read actually.
    Please specify "1" for type=0-16.
    And when the type is "-1", specify "5" in case of 4 operator's messages and specify "17" in case of 16 operator's messages.
    opmsg out

    Pointer to the OPMSG3 structure including the operator's message. The OPMSG3 structure is as follows.

    typedef struct opmsg3 {
         short  datano ;         /* Number of operator's message */
         short  type ;           /* Kind of operator's message */
         short  char_num ;       /* Message length */
         char   data[MSG_SIZE] ; /* Operator's message strings */
    } OPMSG3;                    /* MSG_SIZE : Message length */
    
    datano
    The number of operator's message is stored.
      • message exists
      • * In case of Parameter No.6301#1=0
        number exist : 2000 - 2099
        number does not exist : 2100 to 2999
        * In case of Parameter No.6301#1=1
        number exist : 0 - 99
        number does not exist : 100 - 4095
      • message does not exist
      • -1
    type
    Kind of operator's message is stored.
      0 to 3 : 1st to 4th message
      4 : macro message
      5 to 16 : 5th to 16th message
    char_num
    The operator's message length is stored. The '\0' at the end of strings is included in the length.
    data
    The operator's message strings are stored. The '\0' is set at the end of strings.
    The message is acquired in the following character-codes.
      English : ASCII
      Japanese : Shift-JIS
      Simplified Chinese : Shift-JIS
      Traditional Chinese : GB2312
      Korean : Code Page 949
      Cyrillic : Code Page 1251
      Turkish : Code Page 1254
      Others European : Western Europe

    ERRORS

    Code Description
    EW_LENGTH message number(number) error
    EW_ATTRIB data attribute error
    The specification of the kind of operator's message(type) is wrong.
    EW_NOOPT no option
    Set necessary CNC option.

    misc\cnc_rdopnlgnrl

    Reads the general output signal image of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopnlgnrl(unsigned short FlibHndl, short slct_data, IODBGNRL *opnlgnrl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct_data in

    Specify the data selection flag.

    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8
    • * Bit 8 to 15 is not used.
    • * When the bit corresponding to the signal is set to 0, that signal is not read. To read the signal, set the corresponding bit to 1.
    opnlgnrl out

    Pointer to the IODBGNRL structure including the general output signal image of software operator's panel. The IODBGNRL structure is as follows.

    typedef struct iodbgnrl {
         short     datano;      /* Not used */
         short     type;        /* Data select flag */
         char      sgnal;       /* General-purpose signal 1 to 8 */
    } IODBGNRL ;
    
    datano
    Not used.
    type
    Data selection flag is stored.
    sgnal
    General-purpose signal is stored.
    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8

    ERRORS

    Code Description
    EW_NOOPT No option
    The software operator's panel general SW function and the extended driver/library function are necessary.

    misc\cnc_rdopnlgsname

    Reads the general signal name of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopnlgsname(unsigned short FlibHndl, short slct_data, IODBRDNA *brdna);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct_data in

    Specify the data selection flag.

    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8
    • * Bit 8 to 15 is not used.
    • * When the bit corresponding to the signal is set to 0, that signal is not read. To read the signal, set the corresponding bit to 1.
    brdna out

    Pointer to the IODBRDNA structure including the general signal name of software operator's panel.

    The IODBRDNA structure is as follows.
    typedef struct iodbrdna {
         short  datano;         /* Not used */
         short  type;           /* Data select flag */
         char   sgnl1_name[9];  /* General signal name 1 (ASCII) */
         char   sgnl2_name[9];  /* General signal name 2 (ASCII) */
         char   sgnl3_name[9];  /* General signal name 3 (ASCII) */
         char   sgnl4_name[9];  /* General signal name 4 (ASCII) */
         char   sgnl5_name[9];  /* General signal name 5 (ASCII) */
         char   sgnl6_name[9];  /* General signal name 6 (ASCII) */
         char   sgnl7_name[9];  /* General signal name 7 (ASCII) */
         char   sgnl8_name[9];  /* General signal name 8 (ASCII) */
    } IODBRDNA ;
    
    datano
    Not used.
    type
    Data selection flag is stored.
    sgnl1_name
    General signal name 1 (ASCII) is set.
    sgnl2_name
    General signal name 2 (ASCII) is set.
    sgnl3_name
    General signal name 3 (ASCII) is set.
    sgnl4_name
    General signal name 4 (ASCII) is set.
    sgnl5_name
    General signal name 5 (ASCII) is set.
    sgnl6_name
    General signal name 6 (ASCII) is set.
    sgnl7_name
    General signal name 7 (ASCII) is set.
    sgnl8_name
    General signal name 8 (ASCII) is set.

    At the end of name(sgnl?_name[8]), NULL character('\0') is set.

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_rdopnlsgnl

    Reads the output signal image of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopnlsgnl(unsigned short FlibHndl, short slct_data, IODBSGNL *sgnl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct_data in

    Specify the data select flag.

    bit 0 : Mode signal
    bit 1 : Manual handle feed axis selection signal
    bit 2 : Manual handle feed travel distance selection signal
    bit 3 : Rapid traverse override signal
    bit 4 : Manual feedrate override signal
    bit 5 : Feedrate override signal
    bit 6 : Sppindle override signal (only Series 15i)
    bit 6 : (Not used)
    bit 7 : Optional block skip signal
    bit 8 : Single block signal
    bit 9 : Machine lock signal
    bit 10 : Dry run signal
    bit 11 : Memory protection signal
    bit 12 : Automatic operation halt signal
    bit 13 : (Not used)
    bit 14 : (Not used)
    bit 15 : (Not used)

    * When the bit corresponding to the signal is set to 0, that signal is not read. To read the signal, set the corresponding bit to 1.

    sgnl out

    Pointer to the IODBSGNL structure including the output signal image of software operator's panel.

    The IODBSGNL structure is as follows.
                               
  • Series 15/15i
  • typedef struct iodbsgnl { short datano; /* (Not used) */ short type; /* Data select flag */ short mode; /* Mode signal */ short hndl_ax; /* Manual handle feed axis selection signal */ short hndl_mv; /* Manual handle feed travel distance selection signal */ short rpd_ovrd; /* Rapid traverse override signal */ short jog_ovrd; /* Manual feedrate override signal*/ short feed_ovrd; /* Feedrate override signal */ short spdl_ovrd; /* Spindle override signal */ short blck_del; /* Optional block skip signal(0/1)*/ short sngl_blck; /* Single block signal(0/1) */ short machn_lock; /* Machine lock signal(0/1) */ short dry_run; /* Dry run signal(0/1) */ short mem_prtct; /* Memory protection signal(0/1) */ short feed_hold; /* Automatic operation halt signal(0/1) */ short manual_rpd; /* (Not used) */ short dummy[2]; /* (Not used) */ } IODBSGNL ;
                            
                               
  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  • typedef struct iodbsgnl { short datano; /* (Not used) */ short type; /* Data select flag */ short mode; /* Mode signal */ short hndl_ax; /* Manual handle feed axis selection signal */ short hndl_mv; /* Manual handle feed travel distance selection signal */ short rpd_ovrd; /* Rapid traverse override signal */ short jog_ovrd; /* Manual feedrate override signal */ short feed_ovrd; /* Feedrate override signal */ short spdl_ovrd; /* (Not used) */ short blck_del; /* Optional block skip signal(0/1) */ short sngl_blck; /* Single block signal(0/1) */ short machn_lock; /* Machine lock signal(0/1) */ short dry_run; /* Dry run signal(0/1) */ short mem_prtct; /* Memory protection signal(0/1) */ short feed_hold; /* Automatic operation halt signal(0/1) */ } IODBSGNL ;
    datano
    Not used
    type
    Data selection flag is stored.
    mode
    Mode signal is stored.
  • Series 15/15i
  • 0 : MDI
    1 : MEM
    2 : EDIT
    3 : HND
    4 : JOG
    5 : REF
    6 : DNC
    7 : INC
  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  • 0 : MDI
    1 : MEM
    2 : EDIT
    3 : HNDL or INC
    4 : JOG
    5 : REF
    hndl_ax
    Manual handle feed axis selection signal is stored.
    0 : HX
    1 : HY
    2 : HZ
    3 : H4
    hndl_mv
    Manual handle feed travel distance selection signal is stored.
    0 : ×1
    1 : ×10
    2 : ×100
    rpd_ovrd
    Rapid traverse override signal is stored.
    0 : 100%
    1 : 50%
    2 : 25%
    3 : F0
    jog_ovrd
    Manual feedrate override signal is stored.
    0 : 0% 10 : 2.0% 20 : 52.0%
    1 : 0.1% 11 : 2.7% 21 : 72.0%
    2 : 0.14% 12 : 3.7% 22 : 100%
    3 : 0.2% 13 : 5.2% 23 : 140%
    4 : 0.27% 14 : 7.2% 24 : 200%
    5 : 0.37% 15 : 10.0%
    6 : 0.52% 16 : 14.0%
    7 : 0.72% 17 : 20.0%
    8 : 1.0% 18 : 27.0%
    9 : 1.4% 19 : 37.0%
    feed_ovrd
    Feedrate override signal is stored.
    0 : 0% 10 : 100% 20 : 200%
    1 : 10% 11 : 110%
    2 : 20% 12 : 120%
    3 : 30% 13 : 130%
    4 : 40% 14 : 140%
    5 : 50% 15 : 150%
    6 : 60% 16 : 160%
    7 : 70% 17 : 170%
    8 : 80% 18 : 180%
    9 : 90% 19 : 190%
    spdl_ovrd
    Spindle override signal is stored. (only Series 15i)
    0 : 0% 10 : 100% 20 : 200%
    1 : 10% 11 : 110%
    2 : 20% 12 : 120%
    3 : 30% 13 : 130%
    4 : 40% 14 : 140%
    5 : 50% 15 : 150%
    6 : 60% 16 : 160%
    7 : 70% 17 : 170%
    8 : 80% 18 : 180%
    9 : 90% 19 : 190%
    Not used
    blck_del
    Optional block skip signal (0/1) is stored.
    sngl_blck
    Single block signal (0/1) is stored.
    machn_lock
    Machine lock signal (0/1) is stored.
    dry_run
    Dry run signal (0/1) is stored.
    mem_prtct
    Memory protection signal (0/1) is stored.
    feed_hold
    Automatic operation halt signal (0/1) is stored.
    manual_rpd
    Not used.

    ERRORS

    Code Description
    EW_NOOPT No option
    The software operator's panel function and the extended driver/library function are necessary.

    misc\cnc_rdpm_cncitem

    Reads the item name relating the cnc specified by the item index.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpm_cncitem(unsigned short FlibHndl, short start_num, short* data_num, char (*name)[62]);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_num in

    Specify the starting item index to be read. (1..10)

    data_num in/out

    Specify the pointer for the number of items to be read.
    This function returns the item number that is actually read.

    name[62] out

    Specify the pointer of the array of name strings (each 62 characters).
    The array of this string that is specified by (*data_num) is required.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    The number of items to be read(*data_num) is 0.
    EW_NUMBER data number error
    The starting item index to be read(start_num) is invalid.

    misc\cnc_rdpm_item

    Reads all data specified by the item index.
    The acquired data is as follows.

    - Name
    - Life count type
    - Life time data
    - Life remained time data
    - Life count state


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpm_item(unsigned short FlibHndl, short start_num, short* data_num, IODBPMAINTE* item);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_num in Specify the starting item index to be read. (1..10)
    data_num in/out Specify the pointer for the number of items to be read.
    This function returns the item number that is actually read.
    item out

    Specify the pointer to the array of IODBPMAINTE structure.
    The array of the structure specified by (*data_num) is required.

    The IODBPMAINTE structure is as follows.
    typedef struct tagIODBPMAINTE {
        char  name[62];     /* Name string */
        long  type;         /* Life count type */
        long  total;        /* Life time (unit:minute) */
        long  remain;       /* Life remained time */
        long  stat;         /* Life count state */
    } IODBPMAINTE;
    
    name
    Name string
    This data is terminated with 'NULL'.
    type
    Life count type
    0 : Invalidity
    1 : All time
    2 : Power on
    3 : Running
    4 : Cutting
    total
    Life time
    In case of 16i/18i/21i, unit is "hour".
    In case of 30i/31i/32i, 0i-D/F and PMi-A, unit is "minute".
    unit is "hour".
    remain
    Life remained time
    In case of 16i/18i/21i, unit is "hour".
    In case of 30i/31i/32i 0i-D/F and PMi-A, unit is "minute".
    unit is "hour".
    stat
    Life count state
    16i/18i/21i is unused. "0" is set.

    ERRORS

    Code Description
    EW_LENGTH data block length error
    The number of items to be read(*data_num) is 0.
    EW_NUMBER data number error
    The starting item index to be read(start_num) is invalid.

    misc\cnc_rdpm_mcnitem

    Reads the item name relating the machine specified by the item index.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpm_mcnitem(unsigned short FlibHndl, short start_num, short* data_num, char (*name)[62]);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_num in

    Specify the starting item index to be read. (1..10)

    data_num in/out Specify the pointer for the number of items to be read.
    This function returns the item number that is actually read.
    name[62] in/out

    Specify the pointer of the array of name strings (each 62 characters).
    The array of this string that is specified by (*data_num) is required.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    The number of items to be read(*data_num) is 0.
    EW_NUMBER data number error
    The starting item index to be read(start_num) is invalid.

    misc\cnc_rdposofs

    Reads the mode and vector of the tool position compensation.
    These are stored in each member of ODBPOFS structure.
    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdposofs(unsigned short FlibHndl, ODBPOFS *posofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    posofs out

    Pointer to the ODBPOFS structure for the data of the tool position compensation.

    The ODBPOFS structure is as follows.
    typedef struct odbpofs {
        short   mode;               /* mode            */
        long    ofsvct[MAX_AXIS];   /* offset vector   */
    } ODBPOFS ;     /* MAX_AXIS : max. controlled axes */
    
    mode
    Mode of the tool position compensation is set.
    0 : cancel mode
    1 : offset mode
    * In case of '0', 'ofsvct' is invalid.
    ofsvct
    Vector of the tool position compensation is set.
    The data for current controlled axes are valid.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15M/15T.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_rdprstrinfo

    Reads the program restart information. The program restart information is stored in each member of "ODBPRS".

    In case of Series 16/18, 16i/18i/21i, 0i, 30i, B code read count and value are not used except M series.

    In case of Series 15, the program restart position and remaining travel distance are valid when both NC parameter 2204#1 and 7613#0 are on(=1).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprstrinfo(unsigned short FlibHndl, ODBPRS *prstr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prstr out

    Pointer to the ODBPRS structure including the program restart information. The ODBPRS structure is as follows.

    typedef struct odbprs {
         short   datano;            /* Not used */
         short   type;              /* Not used */
         short   data_info[5];      /* Data setting information */
         long    rstr_bc;           /* Block number */
         long    rstr_m[35];        /* M code value */
         long    rstr_t[2];         /* T code value */
         long    rstr_s;            /* S code value */
         long    rstr_b;            /* B code value */
         long    dest[MAX_AXIS];    /* Program restart position */
         long    dist[MAX_AXIS];    /* Program restart remaining
                                            travel distance */
    } ODBPRS ;      /* MAX_AXIS : max. controlled axes. */
    
    datano
    Not used
    type
    Not used
    data_info
    Data setting information
    The read count for rstr_m, rstr_t, rstr_s, rstr_b is set respectively.
    data_info[0]
    Always 1
    data_info[1]
    M code read count (0 to 35)
    data_info[2]
    T code read count (0 to 2)
    data_info[3]
    S code read count (0 to 1)
    data_info[4]
    B code read count (0 to 1)
    rstr_bc
    Block number is stored.
    rstr_m
    M code value is stored in the array.
    rstr_t
    T code value is stored in the array.
    rstr_s
    S code value is stored.
    rstr_b
    B code value is stored.
    dest
    Program restart position is stored. The limit within the number of controlled axes is effective.
    dist
    Program restart remaining travel distance is stored. The limit within the number of controlled axes is effective.

    ERRORS

    Code Description
    EW_NOOPT No option
    The program restart function and the extended driver/library function is necessary.

    misc\cnc_rdradofs

    Reads the mode and vector of the cutter compensation(tool nose radius compensation).
    These are stored in each member of ODBROFS structure.
    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdradofs(unsigned short FlibHndl, ODBROFS *radofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    radofs out

    Pointer to the ODBROFS structure for the data of the cutter compensation(tool nose radius compensation). The ODBROFS structure is as follows.

    typedef struct odbrofs {
        short   mode;         /* offset mode             */
        short   pln_axes[2];  /* axis of plane selection */
        long    ofsvct[2];    /* offset vector           */
    } ODBROFS ;
    
    mode
    Mode of the cutter compensation(tool nose radius compensation) is set.
    0 : cancel mode
    1 : offset mode
    * In case of '0', the data except 'mode' is invalid.
    pln_axes
    Axis number of plane selection is set.
    (0,..,MAX_AXIS-1) MAX_AXIS:max.controlled axes
    pln_axes[0] : 1st axis number
    pln_axes[1] : 2nd axis number
    ofsvct
    Vector of the cutter compensation(tool nose radius compensation) is set.

    'ofsvct' according to the G code of plane selection is as follows.

    ofsvct[0] ofsvct[1]
    G17 X axis or parallel axis Y axis or parallel axis
    G18 Z axis or parallel axis X axis or parallel axis
    G19 Y axis or parallel axis Z axis or parallel axis

    ERRORS

    Code Description
    EW_NOOPT No option
    Series 15 : The cutter compensation(tool nose radius compensation) option and the extended driver/library option are necessary.
    Series 15i : This function needs the cutter compensation option and the extended driver/library function.

    misc\cnc_rdrepeatval

    Get the counter of the subprogram call and the repeat for fixed cycle. In case of subprogram call, the remainder counter is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrepeatval(unsigned short FlibHndl, long *rep_val);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    rep_val out
    Specify the pointer to the variable to store the repeat counter which is acquired.

    The acquired value is as follows.

  • At power supply is turned on
  • Return value is '-1'.

  • When the block where the repeat counter is specified is not executed.
  • Return value is '-1'.

  • When the block where the subprogram call or the fixed cycle is specified is executed.
  • Specified counter is returned.
    * When the counter is not specified, the 0 is returned.

  • While executing the specified repeat counter.
  • The rest counter is returned.

  • When the block where the subprogram is called or the fixed cycle is executed in the subprogram.
  • The repeat counter specified in this block is returned.

  • When the repeat of subprogram ends, and the processing returns to the former program.
  • The repeat counter of former program is returned.

  • When the first program where the repeat counter is specified ends.
  • Return value is '-1'.

  • When the process is reset during the repeat.
  • Return value is '-1'.

  • When the automatic running is stopped during the repeat and the CNC mode is changed.
  • The rest counter at the stopped is returned.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_NOOPT No option

    misc\cnc_rdrepeatval_ext

    Get the counter of the subprogram call and the repeat for fixed cycle.
    The total repetition number and the remainder counter are acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrepeatval_ext(unsigned short FlibHndl, long *remain, long *total);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    remain out
    Specify the pointer to the variable to store the repeat counter which is acquired.

    The acquired value is as follows.

  • At power supply is turned on
  • Return value is '-1'.

  • When the block where the repeat counter is specified is not executed.
  • Return value is '-1'.

  • When the block where the subprogram call or the fixed cycle is specified is executed.
  • Specified counter is returned.
    * When the counter is not specified, the 0 is returned.

  • While executing the specified repeat counter.
  • The rest counter is returned.

  • When the block where the subprogram is called or the fixed cycle is executed in the subprogram.
  • The repeat counter specified in this block is returned.

  • When the repeat of subprogram ends, and the processing returns to the former program.
  • The repeat counter of former program is returned.

  • When the first program where the repeat counter is specified ends.
  • Return value is '-1'.

  • When the process is reset during the repeat.
  • Return value is '-1'.

  • When the automatic running is stopped during the repeat and the CNC mode is changed.
  • The rest counter at the stopped is returned.
    total out

    Specify the pointer to the variable to store the total repetition number which is acquired.
    This value is effective at "*remain != -1".


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_NOOPT No option

    misc\cnc_rdscaling

    Reads the mode and data of the scaling.
    These are stored in each member of ODBSCL structure.
    The places of decimal points can be got by cnc_getfigure function.
    The unit of magnification follows CNC parameter 6400#1.

    6400#1=0 : 0.00001 times (1/100,000)
    6400#1=1 : 0.001 times


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdscaling(unsigned short FlibHndl, ODBSCL *scale);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    scale out

    Pointer to the ODBSCL structure for the data of the scaling. The ODBSCL structure is as follows.

    typedef struct odbscl {
        short   mode;              /* scaling mode             */
        long    center[MAX_AXIS];  /* center of scaling        */
        long    magnif[MAX_AXIS];  /* magnification of scaling */
    } ODBSCL ;               /* MAX_AXIS : max.controlled axes */
    
    mode
    Mode of the scaling is set.
    0 : cancel mode
    1 : scaling mode
    * In case of '0', the data except 'mode' is invalid.
    center
    Center of scaling is set. The data for current controlled axes are valid.
    magnif
    Magnification of scaling is set. The data for current controlled axes are valid.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15T/15TT.
    EW_NOOPT No option
    The scaling option and the extended driver/library function are necessary.

    misc\cnc_rdsyshard

    Reads the hardware configuration of CNC.

    These information are stored in each member of ODBSYSH.

    The 25 informations can read at a time.

    There is no data depends on the path.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsyshard(unsigned short FlibHndl, short hard_num, short *read_num, ODBSYSH *syshard);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hard_num in

    Specify the hard_num=1 at first time.
    Data information is sequentially acquired. Please add one to hard_num acquired at the end since the second times.

    read_num in

    Pointer to the number of hardware informations to be read.
    This function returns the number of data which was read actually.
    An effective range of the data which can be specified is 1-25.
    When any data cannot read, read_num= 0 is returned.

    syshard out

    Pointer to the ODBSYSH structure for the data of the hardware configuration of CNC.
    The number of array must be required so as to store the 'read_num'. The ODBSYSH structure is as follows.

    typedef struct odbsysh {
        unsigned long id1 ;         /* ID-1(ID)                     */
        unsigned long id2 ;         /* ID-2(additional information) */
        short         group_id ;    /* group ID                     */
        short         hard_id ;     /* hardware ID                  */
        short         hard_num ;    /* hardware number              */
        short         slot_no ;     /* slot number                  */
        short         id1_format ;  /* display format for ID-1      */
        short         id2_format ;  /* display format for ID-2      */
    } ODBSYSH ;
    
    id1
    Hardware ID is stored.
    id2
    Additional information of hardware is stored.
    group_id
    Group ID of hardware
    The value for the group of each hardware is stored.
    Group ID for main hardware is as follows.
    (When data increases newly, ID is added.)
    0100H : MAIN BOARD
    0200H : OPTION BOARD
    0400H : BUS EXTN
    0500H : (UNKNOWN)
    0600H : DISPLAY
    0700H : OTHERS
    0f00H : CERTIFY ID
    hard_id
    Hardware ID
    The value for each hardware is stored.
    Main hardware ID is as follows.
    (When data increases newly, ID is added.)
    0100H : MAIN BOARD
    0101H : CPU CARD
    0102H : SERVO CARD
    0103H : PMC MODULE
    0110H : FROM/SRAM
    0200H : FAST ETHER
    0210H : FL-NET
    0211H : ETHER BOARD
    0212H : ETHER CARD
    0220H : PROFI MASTER
    0230H : PROFI SLAVE
    0240H : C LANGUAGE
    0250H : HSSB 2CH
    0260H : HSSB 1CH
    0270H : TPU
    0280H : ADD SPDL
    0290H : ADD AXIS
    02A0H : DEVNT MASTER
    02B0H : ADD CPU
    02C0H : DEVNT SLAVE
    0400H : BUS EXTN
    0500H : (QFS)
    0510H : (WRC)
    0520H : (ETC)
    0530H : (LIME)
    0540H : (NBG)
    0550H : (LSC)
    0560H : (PHI)
    0570H : (NEW)
    0601H : LCD BOARD
    0602H : DISP ID
    0603H : GUI CARD
    0604H : GUI BOARD
    0605H : GUI ID
    0701H : MDI ID
    0702H : B.UNIT ID
    0f00H : CERTIFY ID-1
    0f01H : CERTIFY ID-2
    0f02H : CERTIFY ID-3
    hard_num
    The number of hardware information is stored.
    slot_no
    The slot number is stored.
    id1_format
    Display format of ID-1.
    id2_format
    Display format of ID-2.
    The display format for ID-1 and ID-2 which is displayed on the system configuration screen is stored.
    0 : No display.
    1 : The hexadecimal number is displayed by the binary number of two digits.
    2 : The hexadecimal number is displayed by the binary number of four digits.
    3 : The hexadecimal number is displayed by the binary number of six digits.
    4 : The hexadecimal number of two digits is displayed.
    5 : The hexadecimal number of four digits is displayed according to examples 1.
    Ex.1) 1234 -> 12/34
    Slash (/) is inserted between characters.
    6 : The hexadecimal number of eight digits is displayed.
    7 : The hexadecimal number of eight digits is sorted according to example 2 and space is inserted between characters.
    Ex.2) 01234567 -> 56723 40 1
    Note : If the formatted value is smaller than that width, display with leading zeros.
    Ex.) In case of id1_format = 3 : 0002H -> 000010

     /**** Example of data ******************************************************
     * group_id/hard_id/   id1  /id1_format/  id2   /id2_format/slot_no/hard_num *
     *                                                                           *
     *  0100H   0100H   00010003      7                 0           0      1     *
     *  0100H   0101H   00060004      7     800C1104    6           0      2     *
     *  0100H   0110H   0000C103      5                 0           0      3     *
     *                                                                           *
     *  0200H   0200H   00011007      7                 0           1      4     *
     *                                                                           *
     *  0200H   0220H   00041007      7                 0           2      5     *
     *                                                                           *
     *  0600H   0602H   00000005      2                 0           0      6     *
     ****************************************************************************/
    
     /* Example of display*************************
     *   1.HARDWARE CONFIGURATION                 *
     *      NAME          ID-1      ID-2   SLOT   *
     *  +-------------+----------+--------+----+  *
     *   MAIN BOARD                               *
     *   MAIN BOARD    00301 00 0                 *
     *   CPU CARD      00406 00 0 800C1104        *
     *   FROM/SRAM     C1/03                      *
     *                                            *
     *   OPTION BOARD                             *
     *   FAST ETHER    00701 10 0             1   *
     *   PROFI(M)      00704 10 0             2   *
     *                                            *
     *   DISPLAY                                  *
     *   DISP ID       0101                       *
     *********************************************/
    

    ERRORS

    Code Description
    EW_DATA hard_num or read_num is wrong.

    misc\cnc_rdsyssoft

    Reads the series/version of CNC system software. These information are stored in each member of ODBSYSS.

    Reading the data which depends on the path needs exchanging the path using cnc_setpath function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsyssoft(unsigned short FlibHndl, ODBSYSS *syssoft);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    syssoft out

    Pointer to the ODBSYSS structure for the data of the series/version of CNC system software.

    The ODBSYSS structure is as follows.
    typedef struct odbsyss {
         char    slot_no_p[16];        /* Physical slot number           */
         char    slot_no_l[16];        /* Logical slot number            */
         short   module_id[16];        /* Module ID                      */
         short   soft_id[16];          /* Software ID                    */
         char    soft_series[16][5];   /* Software series with CPU       */
         char    soft_version[16][5];  /* Software version with CPU      */
         short   soft_inst;            /* soft. installation status      */
         char    boot_ser[5];          /* Series of boot software        */
         char    boot_ver[5];          /* Version of boot software       */
         char    servo_ser[5];         /* Series of servo software       */
         char    servo_ver[5];         /* Version of servo software      */
         char    pmc_ser[5];           /* Series of PMC management soft. */
         char    pmc_ver[5];           /* Version of PMC management soft.*/
         char    ladder_ser[5];        /* Series of ladder software      */
         char    ladder_ver[5];        /* Version of ladder software     */
         char    mcrlib_ser[5];        /* Series of macro library        */
         char    mcrlib_ver[5];        /* Version of macro library       */
         char    mcrapl_ser[5];        /* Series of macro application    */
         char    mcrapl_ver[5];        /* Version of macro application   */
         char    spl1_ser[5];          /* Series of spindle soft.(1st)   */
         char    spl1_ver[5];          /* Version of spindle soft.(1st)  */
         char    spl2_ser[5];          /* Series of spindle soft.(2nd)   */
         char    spl2_ver[5];          /* Version of spindle soft.(2nd)  */
         char    spl3_ser[5];          /* Series of spindle soft.(3rd)   */
         char    spl3_ver[5];          /* Version of spindle soft.(3rd)  */
         char    c_exelib_ser[5];      /* Series of C-executer library   */
         char    c_exelib_ver[5];      /* Version of C-executer library  */
         char    c_exeapl_ser[5];      /* Series of C-exe. application   */
         char    c_exeapl_ver[5];      /* Version of C-exe. application  */
         char    int_vga_ser[5];       /* Series of VGA soft.(internal)  */
         char    int_vga_ver[5];       /* Version of VGA soft.(internal) */
         char    out_vga_ser[5];       /* Series of VGA soft.(external)  */
         char    out_vga_ver[5];       /* Version of VGA soft.(external) */
         char    pmm_ser[5];           /* Series of power motion manager software  */
         char    pmm_ver[5];           /* Version of power motion manager software */
         char    pmc_mng_ser[5];       /* Series of PMC management software        */
         char    pmc_mng_ver[5];       /* Version of PMC management software       */
         char    pmc_shin_ser[5];      /* Series of PMC management software  (internal SH) */
         char    pmc_shin_ver[5];      /* Version of PMC management software (internal SH) */
         char    pmc_shout_ser[5];     /* Series of PMC management software  (external SH) */
         char    pmc_shout_ver[5];     /* Version of PMC management software (external SH) */
         char    pmc_c_ser[5];         /* Series of PMC management software  (C language)  */
         char    pmc_c_ver[5];         /* Version of PMC management software (C language)  */
         char    pmc_edit_ser[5];      /* Series of PMC management software  (edit card)   */
         char    pmc_edit_ver[5];      /* Version of PMC management software (edit card)   */
         char    lddr_mng_ser[5];      /* Series of ladder software   */
         char    lddr_mng_ver[5];      /* Version of ladder software  */
         char    lddr_apl_ser[5];      /* Series of ladder software  (C application) */
         char    lddr_apl_ver[5];      /* Version of ladder software (C application) */
         char    spl4_ser[5];          /* Series of spindle soft.(4th)  */
         char    spl4_ver[5];          /* Version of spindle soft.(4th) */
         char    mcr2_ser[5];          /* Series of 2nd macro-executer  */
         char    mcr2_ver[5];          /* Version of 2nd macro-executer */
         char    mcr3_ser[5];          /* Series of 3rd macro-executer  */
         char    mcr3_ver[5];          /* Version of 3rd macro-executer */
         char    eth_boot_ser[5];      /* Series of boot software of Ethernet Board  */
         char    eth_boot_ver[5];      /* Version of boot software of Ethernet Board */
         char    reserve[8][5];        /* (reserve) */
    } ODBSYSS ;
    
    slot_no_p
    Physical slot number
    The physical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid.
    00H to 0FH : Primary slot number
    80H to 8FH : Secondary slot number
    slot_no_l
    Logical slot number
    The logical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid.
    00H to 0FH : logical slot number
    module_id
    Module ID
    The module ID of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid. 'XX' is internal information.
    The followings are main module ID.
    • Series 15i
    • XXEBH : CNC Main
      XXE0H : PMC C language board
      XXD8H : Additional axis board
      XXFEH : Ethernet board
      XXAAH : HSSB I/F
      XX81H : Customer's board
      XXFCH : PROFIBUS DP(Master)
      XXE3H : PROFIBUS DP(Slave)
      XXEFH : DEVICENET(Master)
      XXBFH : DEVICENET(Slave)
      XX59H : FL-NET
    • Series 16/18, 16i/18i/21i, 0i, Power Mate i
    • XX3FH : Remote buffer
      XX45H : Graphic(CAP-II)
      XX46H : I/O card
      XX6DH : CAP-II
      XX7FH : RISC(64bit)
      XX94H : MMC-IV
      XX9AH : Graphic (standard)
      XX9DH : PMC-SC
      XXA7H : FS16B/Main(6 axes)
      XX95H : I/O Link-2(Gate array version)
      XXAAH : HSSB
      XXC4H : I/O Link-2
      XXDDH : Power Mate i
      XXADH : FS18B/Main(4 axes)
      XXAEH : FS18B/Main(6 axes)
      XXB0H : FS16B/SUB
      XXB2H : FS16B/Main(4 axes)
      XXB4H : FS18B/SUB
      XXB7H : FS16C/Main(6 axes)
      XXB9H : FS16C,18C/SUB
      XXBAH : FS16C,18C/SUB
      XXBDH : FS18C/Main(6 axes)
    soft_id
    Software ID
    The software ID of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid.
    The followings are main software ID.
    • Series 15i
    • 40H : CNC Main
      41H : PMC C language board
      50H : Additional axis board
      61H : Ethernet board
      65H : HSSB I/F
      44H : Customer's board
      6AH : PROFIBUS DP(Master)
      69H : PROFIBUS DP(Slave)
      70H : DEVICENET(Master)
      71H : DEVICENET(Slave)
      76H : FL-NET
    • Series 16/18, 16i/18i/21i, 0i, Power Mate i
    • 40H : CNC
      41H : PMC-SC
      42H : Internal I/O card
      43H : CNC SUB
      45H : Graphic (standard)
      46H : Graphic(CAP-II)
      49H : CAP-II
      4AH : Remote buffer
      4FH : PMC-SE
      5EH : MMC-IV,HSSB I/F
      67H : PMC-SB5/SB6
    soft_series
    Software series
    Software series information is stored in ASCII code in order of its position (4 byte + 'NULL').
    soft_version
    Software version
    Software series information is stored in ASCII code in order of its position (4 byte + 'NULL').
    soft_inst
    Software installation status for CNC/CNC SUB/LOADER(dependent on path)
    bit0 = 1 : OPTION-A1
    bit1 = 1 : OPTION-A2
    bit2 = 1 : OPTION-A3
    bit3 = 1 : OPTION-A4
    boot_ser
    Series of boot software
    boot_ver
    Version of boot software
    servo_ser
    Series of servo software (dependent on path)
    servo_ver
    Version of servo software (dependent on path)
    pmc_ser
    Series of PMC management soft (dependent on path)
    Use pmc_mng_ser instead of pmc_ser.
    pmc_ver
    Series of PMC management software (dependent on path)
    Use pmc_mng_ser instead of pmc_ser.
    ladder_ser
    Series of ladder software (dependent on path)
    Use ladder_mng_ser instead of ladder_ser.
    ladder_ver
    Version of ladder software (dependent on path)
    Use ladder_mng_ser instead of ladder_ver.
    mcrlib_ser
    Series of macro library/order made macro (dependent on path)
    mcrlib_ver
    Version of macro library/order made macro (dependent on path)
    mcrapl_ser
    Series of macro application (dependent on path)
    mcrapl_ver
    Version of macro application (dependent on path)
    spl1_ser
    Series of spindle software (1st) (dependent on path)
    spl1_ver
    Version of spindle software (1st) (dependent on path)
    spl2_ser
    Series of spindle software (2nd) (dependent on path)
    spl2_ver
    Version of spindle software (2nd) (dependent on path)
    spl3_ser
    Series of spindle software (3rd) (dependent on path)
    spl3_ver
    Version of spindle software (3rd) (dependent on path)
    c_exelib_ser
    Series of C-executer library
    c_exelib_ver
    Version of C-executer application
    c_exeapl_ser
    Series of C-executer application
    c_exeapl_ver
    Version of C-executer application
    int_vga_ser
    Series of VGA software (internal)
    int_vga_ver
    Version of VGA software (internal)
    out_vga_ser
    Series of VGA software (external)
    out_vga_ver
    Version of VGA software (external)

    * Following items are only available for Series 15i, Series 16i/18i/21i, 0i, and Power Mate i.

    pmm_ser
    Series of power motion manager software (dependent on path)
    pmm_ver
    Version of power motion manager software (dependent on path)
    pmc_mng_ser
    Series of PMC management software (dependent on path)
    Please use this item instead of sPmc_ser if CNC is Series 16i/18i/21i, 0i, Power Mate i.
    pmc_mng_ver
    Version of PMC management soft (dependent on path)
    Please use this item instead of sPmc_ver if CNC is Series 16i/18i/21i, 0i, Power Mate i.
    pmc_shin_ser
    Series of PMC management software (internal SH) (dependent on path)
    pmc_shin_ver
    Version of PMC management software (internal SH) (dependent on path)
    pmc_shout_ser
    Series of PMC management software (external SH) (dependent on path)
    pmc_shout_ver
    Version of PMC management software (external SH) (dependent on path)
    pmc_c_ser
    Series of PMC management software (C language) (dependent on path)
    pmc_c_ver
    Version of PMC management software (C language) (dependent on path)
    pmc_edit_ser
    Series of PMC management software (edit card) (dependent on path)
    pmc_edit_ver
    Version of PMC management software (edit card) (dependent on path)
    lddr_mng_ser
    Series of ladder software (dependent on path)
    Please use this item instead of ladder_ser if CNC is Series 15i, 16i/18i/21i, 0i, Power Mate i.
    lddr_mng_ver
    Version of ladder software (dependent on path)
    Please use this item instead of ladder_ver if CNC is Series 15i, 16i/18i/21i, 0i, Power Mate i.
    lddr_apl_ser
    Series of ladder software (C application) (dependent on path)
    lddr_apl_ver
    Version of ladder software (C application) (dependent on path)
    spl4_ser
    Series of spindle software (4th) (dependent on path)
    spl4_ver
    Version of spindle software (4th) (dependent on path)
    mcr2_ser
    Series of 2nd macro executer (dependent on path)
    mcr2_ver
    Series of 2nd macro executer (dependent on path)
    mcr3_ser
    Series of 3rd macro executer (dependent on path)
    mcr3_ver
    Version of 3rd macro executer (dependent on path)
    eth_boot_ser
    Series of boot software of Ethernet Board
    eth_boot_ver
    Version of boot software of Ethernet Board
    reserve
    (reserve)

    * Above series/version are stored in ASCII code(4 byte + 'NULL'). In case of no software, first character is 'NULL'.


    ERRORS

    Code Description

    misc\cnc_rdsyssoft2

    Reads the series/version of CNC system software. These information are stored in each member of ODBSYSS2.

    This function can read data which cnc_rdsyssoft cannot read.

    Reading the data which depends on the path needs exchanging the path using cnc_setpath function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsyssoft2(unsigned short FlibHndl, ODBSYSS2 *syssoft2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    syssoft2 out

    Pointer to the ODBSYSS2 structure for the data of the series/version of CNC system software.

    The ODBSYSS2 structure is as follows.
    typedef struct odbsyss2 {
         char    slot_no_p[16];        /* Physical slot number               */
         char    slot_no_l[16];        /* Logical slot number                */
         short   module_id[16];        /* Module ID                          */
         short   soft_id[16];          /* Software ID                        */
         char    soft_series[16][5];   /* Software series with CPU           */
         char    soft_version[16][5];  /* Software version with CPU          */
         short   soft_inst;            /* Software installation status       */
         char    boot_ser[5];          /* Series of boot software            */
         char    boot_ver[5];          /* Version of boot software           */
         char    servo_ser[5];         /* Series of servo software           */
         char    servo_ver[5];         /* Version of servo software          */
         char    pmc_ser[5];           /* Series of PMC management software  */
         char    pmc_ver[5];           /* Version of PMC management software */
         char    ladder_ser[5];        /* Series of ladder software          */
         char    ladder_ver[5];        /* Version of ladder software         */
         char    mcrlib_ser[5];        /* Series of macro library            */
         char    mcrlib_ver[5];        /* Version of macro library           */
         char    mcrapl_ser[5];        /* Series of macro application        */
         char    mcrapl_ver[5];        /* Version of macro application       */
         char    spl1_ser[5];          /* Series of spindle software  (1st)  */
         char    spl1_ver[5];          /* Version of spindle software (1st)  */
         char    spl2_ser[5];          /* Series of spindle software  (2nd)  */
         char    spl2_ver[5];          /* Version of spindle software (2nd)  */
         char    spl3_ser[5];          /* Series of spindle software  (3rd)  */
         char    spl3_ver[5];          /* Version of spindle software (3rd)  */
         char    c_exelib_ser[5];      /* Series of C-executer library       */
         char    c_exelib_ver[5];      /* Version of C-executer library      */
         char    c_exeapl_ser[5];      /* Series of C-exe. application       */
         char    c_exeapl_ver[5];      /* Version of C-exe. application      */
         char    int_vga_ser[5];       /* Series of VGA software  (internal) */
         char    int_vga_ver[5];       /* Version of VGA software (internal) */
         char    out_vga_ser[5];       /* Series of VGA software  (external) */
         char    out_vga_ver[5];       /* Version of VGA software (external) */
         char    pmm_ser[5];           /* Series of power motion manager software  */
         char    pmm_ver[5];           /* Version of power motion manager software */
         char    pmc_mng_ser[5];       /* Series of PMC management software        */
         char    pmc_mng_ver[5];       /* Version of PMC management software       */
         char    pmc_shin_ser[5];      /* Series of PMC management software  (internal SH) */
         char    pmc_shin_ver[5];      /* Version of PMC management software (internal SH) */
         char    pmc_shout_ser[5];     /* Series of PMC management software  (external SH) */
         char    pmc_shout_ver[5];     /* Version of PMC management software (external SH) */
         char    pmc_c_ser[5];         /* Series of PMC management software  (C language)  */
         char    pmc_c_ver[5];         /* Version of PMC management software (C language)  */
         char    pmc_edit_ser[5];      /* Series of PMC management software  (edit card)   */
         char    pmc_edit_ver[5];      /* Version of PMC management software (edit card)   */
         char    lddr_mng_ser[5];      /* Series of ladder software          */
         char    lddr_mng_ver[5];      /* Version of ladder software         */
         char    lddr_apl_ser[5];      /* Series of ladder software  (C application) */
         char    lddr_apl_ver[5];      /* Version of ladder software (C application) */
         char    spl4_ser[5];          /* Series of spindle software  (4th)  */
         char    spl4_ver[5];          /* Version of spindle software (4th)  */
         char    mcr2_ser[5];          /* Series of 2nd macro-executer       */
         char    mcr2_ver[5];          /* Version of 2nd macro-executer      */
         char    mcr3_ser[5];          /* Series of 3rd macro-executer       */
         char    mcr3_ver[5];          /* Version of 3rd macro-executer      */
         char    eth_boot_ser[5];      /* Series of boot software of Ethernet Board  */
         char    eth_boot_ver[5];      /* Version of boot software of Ethernet Board */
         char    reserve[8][5];        /* (reserve) */
         char    embEthe_ser[5];       /* Series of embedded Ethernet software     */
         char    embEthe_ver[5];       /* Version of embedded Ethernet software    */
         char    reserve2[38][5];      /* (reserve) */
    } ODBSYSS2 ;
    
    slot_no_p,...,reserve are the same as what cnc_rdsyssoft can read. See the explanation about cnc_rdsyssoft in detail.

    However, you may not read the data after "reserve" according to the series/version of CNC control software.

    embEthe_ser
    Series of embedded Ethernet software
    embEthe_ver
    Version of embedded Ethernet software
    reserve2
    (reserve)

    * Above series/version are stored in ASCII code(4 byte + 'NULL'). In case of no software, first character is 'NULL'.


    ERRORS

    Code Description

    misc\cnc_rdsyssoft3

    Reads the series/version of CNC system software.

    These information are stored in each member of ODBSYSS3.

    This function can read the series/version information of the system software that can be used on the system.

    There is no data depends on the path.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsyssoft3(unsigned short FlibHndl, short s_id, short *read_num, short *all_num, ODBSYSS3 *syssoft3);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_id in

    Specify starting ID of series/version information that you want to read.

    This function gathers IDs from the specified one to larger ones.

    When you want to read all series/version information, first specify as "s_id = 0", then repeat the reading by specifying as s_id = (last acquired s_id) + 1"

    read_num in/out

    Specify the pointer for the number of software information to be read.

    This function returns the number of data that was read actually.

    Valid data range is 1,...,40.

    When no data is read, "read_num = 0" is returned.

    all_num out

    Specify the pointer for the number of all software information.

    syssoft3 out

    Pointer to the ODBSYSS3 structure for the data of the series/version of CNC system software. The number of array must be required so as to store the 'read_num'.

    The ODBSYSS3 structure is as follows.
    typedef struct odbsyss3 {
        short   soft_id ;           /* Software ID      */
        char    soft_series[5] ;    /* Software series  */
        char    soft_edition[5] ;   /* Software version */
    } ODBSYSS3 ;
    
    soft_id
    Software ID
    Pointer to the ODBSYSS3 structure for the data of the series/version of CNC system software.
    The array of this structure that is specified by (*read_num) is required.
    - FS30i/31i-32i-A, 0i-D
    0101H : CNC basic software
    0102H : CNC option software A1
    0103H : CNC option software A2
    0104H : CNC option software A3
     
    0111H : CNC language display ROM English (Basic)
    0112H : CNC language display ROM Japanese
    0113H : CNC language display ROM German
    0114H : CNC language display ROM French
    0115H : CNC language display ROM Traditional Chinese
    0116H : CNC language display ROM Italian
    0117H : CNC language display ROM Korean
    0118H : CNC language display ROM Spanish
    0119H : CNC language display ROM Dutch
    011AH : CNC language display ROM Danish
    011BH : CNC language display ROM Portuguese
    011CH : CNC language display ROM Polish
    011DH : CNC language display ROM Hungarian
    011EH : CNC language display ROM Swedish
    011FH : CNC language display ROM Czech
    0120H : CNC language display ROM Simplified Chinese
    0121H : CNC language display ROM Russian
    0122H : CNC language display ROM Turkish
     
    0123H : CNC option software A21
    0124H : CNC option software A22
     
    0141H : reserve
     
    0151H : BOOT software
     
    0201H : PMC system software 1
    0211H : PMC ladder 1 (first ladder)
    0212H : PMC ladder 2 (second ladder)
    0213H : PMC ladder 3 (third ladder)
    0214H : PMC ladder 4 (ladder for DUAL CHECK)
     
    0221H : C language board system software
    0222H : C language board user software
     
    0301H : Servo software 1
    0302H : Servo software 2
    0303H : Servo software 3
    0304H : Servo software 4
    0305H : Servo software 5
    0306H : Servo software 6
    0307H : Servo software 7
    0308H : Servo software 8
    0309H : Servo software 9
    030AH : Servo software 10
     
    0501H : 1st spindle software
    0502H : 2nd spindle software
    0503H : 3rd spindle software
    0504H : 4th spindle software
    0505H : 5th spindle software
    0506H : 6th spindle software
    0507H : 7th spindle software
    0508H : 8th spindle software
     
    0601H : Graphic software 1
    0602H : Graphic software 2
    0603H : Graphic software 3
    0604H : Graphic software 4 (font data)
     
    0701H : Macro executor 1
    0702H : Macro executor 2
    0703H : Macro executor 3
    0704H : Macro executor 4
    0705H : Macro executor 5
    0706H : Macro executor 6
    0707H : Macro executor 7
    0708H : Macro executor 8
    0709H : Macro executor 9
    070AH : Macro executor 10
    070BH : Macro executor 11
    070CH : Macro executor 12
    070DH : Macro executor 13
    070EH : Macro executor 14
    070FH : Macro executor 15
    0710H : Macro executor 16
    0711H : Macro executor 17
    0712H : Macro executor 18
    0713H : Macro executor 19
    0714H : Macro executor 20
    075AH : Manual Guide i (Macro executor for Milling system)
    075BH : Manual Guide i (Macro executor for Lathe system)
     
    0801H : C language executor library
    0802H : C language executor application
    0808H : FANUC Auto HMI/T
    0809H : FANUC Auto HMI/T
    0811H : Manual Guide i library
    0812H : Manual Guide i application
    0820H : C language executor data
    0821H : C language executor data
    0822H : C language executor data
    0823H : C language executor data
    0824H : C language executor data
    0825H : C language executor data
    0826H : C language executor data
    0827H : C language executor data
    0828H : C language executor data
    0829H : C language executor data
    0830H : Manual Guide i data
    0831H : Manual Guide i data
    0832H : Manual Guide i data
    0833H : Manual Guide i data
    0834H : Manual Guide i data
    0835H : Manual Guide i data
    0836H : Manual Guide i data
    0837H : Manual Guide i data
    0838H : Manual Guide i data
    0839H : Manual Guide i data
     
    0901H : Network management NET
    0911H : Embedded Ethernet
    0912H : Ethernet display function
    0921H : Profibus 1
    0922H : Profibus 2
    0923H : Device-net 1
    0924H : Device-net 2
    0925H : FL-net 1
    0926H : FL-net 2
    0927H : Profibus 3
    0929H : FL-net/Ethernet
    092AH : CC-Link
    0931H : Data server
     
    0A01H : Customer's board Syatem
    0A02H : Customer's board User
     
    - 0i-F, 30i/31i/32i/35i-B, PMi-A
    0101H : CNC system control software 1
    0102H : CNC system control software 2
    0103H : CNC system control software 3
    0104H : CNC system control software 4
    0111H : CNC language display ROM 1
    0112H : CNC language display ROM 2
    0113H : CNC language display ROM 3
    0114H : CNC language display ROM 4
    0115H : CNC language display ROM 5
    0141H : reserve
    0151H : BOOT software
     
    0201H : PMC system software 1
    0211H : PMC ladder 1 (first ladder)
    0212H : PMC ladder 2 (second ladder)
    0213H : PMC ladder 3 (third ladder)
    0214H : PMC ladder 4 (fourth ladder)
    0215H : PMC ladder 5 (fifth ladder)
    0216H : PMC ladder DSC (ladder for DUAL CHECK)
    0221H : PMC1 language display ROM
    0222H : PMC2 language display ROM
    0223H : PMC3 language display ROM
    0224H : PMC4 language display ROM
    0225H : PMC5 language display ROM
    0231H : I/O Linki layout data
     
    0301H : Servo software 1
    0302H : Servo software 2
    0303H : Servo software 3
    0304H : Servo software 4
    0305H : Servo software 5
    0306H : Servo software 6
    0307H : Servo software 7
    0308H : Servo software 8
    0309H : Servo software 9
    030aH : Servo software 10
     
    0501H : 1st spindle software
    0502H : 2nd spindle software
    0503H : 3rd spindle software
    0504H : 4th spindle software
    0505H : 5th spindle software
    0506H : 6th spindle software
    0507H : 7th spindle software
    0508H : 8th spindle software
     
    0601H : Graphic software 1
    0602H : Graphic software 2
    0603H : Graphic software 3
    0604H : Graphic software 4 (font data)
     
    0701H : Manual Guide i library
    0702H : Manual Guide i application
    0703H : Manual Guide i (Macro executor for Milling system)
    0704H : Manual Guide i (Macro executor for Lathe system)
    0710H : Manual Guide i user data (CEX0DATU)
    0711H : Manual Guide i user data (CEX1DATU)
    0712H : Manual Guide i user data (CEX2DATU)
    0713H : Manual Guide i user data (CEX3DATU)
    0714H : Manual Guide i user data (CEX4DATU)
    0715H : Manual Guide i user data (CEX5DATU)
    0716H : Manual Guide i user data (CEX6DATU)
    0717H : Manual Guide i user data (CEX7DATU)
    0718H : Manual Guide i user data (CEX8DATU)
    0719H : Manual Guide i user data (CEX9DATU)
     
    0801H : Macro executor 1
    0802H : Macro executor 2
    0803H : Macro executor 3
    0804H : Macro executor 4
    0805H : Macro executor 5
    0806H : Macro executor 6
    0807H : Macro executor 7
    0808H : Macro executor 8
    0809H : Macro executor 9
    080AH : Macro executor 10
    080BH : Macro executor 11
    080CH : Macro executor 12
    080DH : Macro executor 13
    080EH : Macro executor 14
    080FH : Macro executor 15
    0810H : Macro executor 16
    0811H : Macro executor 17
    0812H : Macro executor 18
    0813H : Macro executor 19
    0814H : Macro executor 20
     
    0901H : C language executor library
    0902H : C language executor application
    0908H : FANUC Auto HMI/T
    0909H : FANUC Auto HMI/T
    0920H : C language executor data
    0921H : C language executor data
    0922H : C language executor data
    0923H : C language executor data
    0924H : C language executor data
    0925H : C language executor data
    0926H : C language executor data
    0927H : C language executor data
    0928H : C language executor data
    0929H : C language executor data
     
    0A01H : Network management NET
    0A11H : Embedded Ethernet
    0A12H : Ethernet display function
    0A18H : USB function
    0A21H : Profibus 1
    0A22H : Profibus 2
    0A23H : Device-net 1
    0A24H : Device-net 2
    0A25H : FL-net 1
    0A26H : FL-net 2
    0A27H : Profibus 3
    0A29H : FL-net/Ethernet
    0A2AH : CC-Link
    0A31H : Data server
     
    0B01H : Customer's board Syatem
    0B02H : Customer's board User
    soft_series
    Software series
    Software series information is stored in ASCII code in order of its position (4 byte + 'NULL').
    soft_edition
    Software version
    Software series information is stored in ASCII code in order of its position (4 byte + 'NULL').

    ERRORS

    Code Description

    misc\cnc_rdtimer

    Gets cutting time, cycle time, and other timer data of CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtimer(unsigned short FlibHndl, short type, IODBTIME *time);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify timer data to be read.

    0 : Power on time
    1 : Operating time
    2 : Cutting time
    3 : Cycle time
    4 : Free purpose

    time out

    Pointer to the IODBTIME structure including timer data of CNC.

    The IODBTIME structure is as follows.
    typedef struct iodbtime {
            long    minute ;    /* minutes (0 - 999999999) */
            long    msec ;      /* milliseconds (0 - 59999) */
    } IODBTIME ;
    

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of timer data (type) is wrong.

    misc\cnc_reset

    Executes the external reset of CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_reset(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_BUSY Busy
    CNC has been reseted.
    EW_STOP CNC is in the emergency stop.

    misc\cnc_reset2

    CNC is reset.

    When this function is executed, reset is executed to all paths or the path selected bt CNC according to set value of parameter No.8100#0(RST) of 1st path.

    Note) : In case of M system, if this function is executed during the background drawing when the set value of parameter No.8100#0(RST) is 1, the background drawing is not reset but the processing side is reset. When the set value of parameter No.8100#0(RST) is 0, both of the background drawing and the processing side are reset.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_reset2(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_REJECT CNC execution rejection
    Path selected by path select signal is emergency stop or reset status.(30i/31i/32i, 0i-D/F only)

    misc\cnc_rstrseqsrch

    Searches the sequence number for program restart.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rstrseqsrch(unsigned short FlibHndl, long no, long rep, short no_type, short pq_type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    no in

    Specify the Sequence / Block number.

    rep in

    Specify the count.

    no_type in Specify the number type.
    0 : Sequence number
    1 : Block number
    pq_type in Specify the search type.
    0 : P type
    1 : Q type

    ERRORS

    Code Description
    EW_NUMBER Data number error
    The specification of number type (no_type) is wrong.
    EW_ATTRIB Data attribute error
    The specification of search type (pq_type) is wrong.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure.
    0 : Completion status other than EW_DATA
    1 : Sequence / Block number(no) error
    2 : Count(rep) error
    EW_NOOPT No option
    The program restart function and the extended driver/library function is necessary.
    EW_MODE CNC mode error
    - Set CNC mode to MEM, RMT(only 30i/31i/32i, 0i-D/F).
    - Program restart signel was OFF. (only 30i/31i/32i, 0i-D/F)
    EW_REJECT CNC execution rejected
    - Program restart signel was OFF. (except 30i/31i/32i, 0i-D/F)

    misc\cnc_rstrseqsrch2

    Searches the sequence number for program restart.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rstrseqsrch2(unsigned short FlibHndl, long no, long rep, short no_type, short pq_type, long prg_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    no in

    Specify the Sequence / Block number.

    rep in

    Specify the count.

    no_type in the number type.
    0 : Sequence number
    1 : Block number
    pq_type in Specify the search type.
    0 : P type
    1 : Q type
    prg_no in Specify the search program number.

    ERRORS

    Code Description
    EW_NUMBER data number error
    Number type (no_type) is wrong.
    EW_ATTRIB data attribute error
    Search type (pq_type) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Sequence / Block number (no) error
    2 : Count (rep) error
    3 : Program number (prg_no) error
    EW_NOOPT No option
    The program restart function and the extended driver/library function is necessary.
    EW_MODE CNC mode error
    Set CNC mode to MEM.
    EW_REJECT CNC execution rejected

    misc\cnc_setpath

    Selects the path number which is the target path in the multi-path system or system with loader control.

    All Data window library functions input from/output to the CNC's path selected by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setpath(unsigned short FlibHndl, short path_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path_no in

    Specify the path number.

    0 : (The 1st path)
    1 : The 1st path
    2 : The 2nd path
    3 : The 3rd path
    4 : The 4th path (Only Series 30i)
    5 : The 5th path (Only Series 30i)/for loader (except Series 30i)
    6 : The 6th path (Only Series 30i)
    7 : The 7th path (Only Series 30i)
    8 : The 8th path (Only Series 30i)
    9 : The 9th path (Only Series 30i)
    10 : The 10th path (Only Series 30i)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path_no in

    Specify the path number. (0,..,10)

    0 means 1st path. (=1)


    ERRORS

    Code Description
    EW_PATH Path number error
    The path number (path_no) is wrong.

    misc\cnc_settimer

    Sets the date or time data to the calendar timer device of the CNC unit.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_settimer(unsigned short FlibHndl, IODBTIMER *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf in

    Pointer to the IODBTIMER structure including the date or time of CNC.

    The IODBTIMER structure is as follows.
    typedef struct iodbtimer {
            short   type ;          /* Spec. of date or time. */
            short   dummy ;         /* Not used. */
            union {
                    struct {
                            short   year ;  /* Year. */
                            short   month ; /* Month. */
                            short   date ;  /* Date. */
                    } date ;
                    struct {
                            short   hour ;  /* Hour. */
                            short   minute ;/* Minute. */
                            short   second ;/* Second. */
                    } time ;
            } data ;
    } IODBTIMER ;
    

    Specify one of the following values in "buf.type". (It is impossible to set both date and time simultaneously.)

    buf.type Data to be set
    0 Sets date
    1 Sets time

    Store the date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format as follows.

    Member Setting data Range of value
    buf.data.date.year Year 1987 - 2085(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    1986 - 2086(Series 15)
    1995 - 2094(Series 15i)
    1997 - 2096(Series 30i/31i/32i, 0i-D/F, PMi-A)
    buf.data.date.month Month 1 - 12
    buf.data.date.date Date 1 - 31
    buf.data.time.hour Hour 0 - 23
    buf.data.time.minute Minute 0 - 59
    buf.data.time.second Second 0 - 59

    That is, the following data can be set for CNC.

    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    from "00:00:00, Jan. 1, 1987" to "23:59:59, Dec. 31, 2085"
    Series 15
    from "00:00:00, Jan. 1, 1986" to "23:59:59, Dec. 31, 2086"
    Series 15i
    from "00:00:00, Jan. 1, 1995" to "23:59:59, Dec. 31, 2094"
    Series 30i/31i/32i, 0i-D/F, PMi-A
    from "00:00:00, Jan. 1, 1997" to "23:59:59, Dec. 31, 2096"

    For Series 16i/18i/21i, 0i-A/B/C, and Power Mate i, this function doesn't check the validity of date format (buf.data.date.*) strictly. For example, "Feb. 31" can be set. In this case, "Feb. 31" is read by cnc_gettimer function, and "Feb. 31" is displayed on the setting screen of CNC.

    For Series 15/15i, 30i/31i/32i, 0i-D/F and PMi-A, this function check the validity of date format (buf.data.date.*) strictly. When you try setting "Apr. 31" or "Feb. 29 (not in a leap year)", this function returns EW_DATA.

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf in

    Pointer to the IODBTIMER structure including the date or time of CNC.

    The IODBTIMER structure is as follows.
    typedef struct iodbtimer {
            short   type ;          /* Spec. of date or time. */
            short   dummy ;         /* Not used. */
            union {
                    struct {
                            short   year ;  /* Year. */
                            short   month ; /* Month. */
                            short   date ;  /* Date. */
                    } date ;
                    struct {
                            short   hour ;  /* Hour. */
                            short   minute ;/* Minute. */
                            short   second ;/* Second. */
                    } time ;
            } data ;
    } IODBTIMER ;
    

    Specify one of the following values in "buf.type". (It is impossible to set both date and time simultaneously.)

    buf.type Data to be set
    0 Sets date
    1 Sets time

    Store the date value or time value in each member of "buf.data.date" or "buf.data.time" with binary format as follows.

    Member Setting data Range of value
    buf.data.date.year Year 1997 - 2096
    buf.data.date.month Month 1 - 12
    buf.data.date.date Date 1 - 31
    buf.data.time.hour Hour 0 - 23
    buf.data.time.minute Minute 0 - 59
    buf.data.time.second Second 0 - 59

    This function check the validity of date format (IODBTIMER1) strictly. When you try setting "Apr. 31" or "Feb. 29 (not in a leap year)", this function returns EW_DATA.


    ERRORS

    Code Description
    EW_NUMBER Incorrect spec. of date or time "buf.type".
    EW_DATA Incorrect date or time data.
    EW_REJECT Failed to set the data to the calendar timer device.
    Any hardware may be out of order.

    misc\cnc_sramget

    Reads the S-RAM data from CNC.
    The SRAM data which was read by this function should be restored by using the Boot function.(The SRAM data cannot be restored while the system is running).
    It is necessary to make the file having the file name which was acquired by cnc_getsraminfo function to restore the SRAM data by using the Boot function.
    Refer to the following for the method of making the file for the S-RAM data.

    The procedure of reading S-RAM data and storing the data to the file is as follows.

    The total size which can be read finally is S-RAM size(sramsize) acquired by the cnc_getsraminfo function.

    When you store the read SRAM data to the file, please store the divided S-RAM data into the files whose names were acquired by cnc_getsraminfo function in order of the file names.
    The size of one file is calculated from information of cnc_getsraminfo as follows.

    Size of S-RAM data (sramsize)
    Size of one file =
    Number of file division (dibnumber)

      Ex.) i Series(1Mbyte S-RAM)
      Information acquired by cnc_getsraminfo
      sramsize = 1Mbyte(1048576byte) = 1024Kbyte
      divnumber = 2
      fname[0] = "SRAM1_0A.FDB"
      fname[1] = "SRAM1_0B.FDB"
      Size of one file = 1024Kbyte / 2 = 512Kbyte

      Make the file whose size is 512 Kbyte in order of SRAM1_0A.FDB, SRAM1_0B.FDB.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sramget(unsigned short FlibHndl, short *stat, void *data, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stat out

    Specify the address of the variable by which the reading state of S-RAM is stored.

    0 : End of reading process
    1 : Reading process continued

    Call the cnc_sramgetend function in case of stat=0.

    data out

    Pointer to the variable to which the reading data is stored.
    Specify the pointer of the variable to which the S-RAM data is stored.

    length in/out

    Pointer to the variable to which the data length was set.
    Specify the size in byte which you want to read to the variable. After executing this function, the size of data which was actually read is set.
    The maximum size which can be read at a time is S-RAM size (sramsize) acquired by the cnc_getsraminfo function.
    This function returns EW_LENGTH if '*length' is less than 256.


    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_sramgetstart function has not been executed
    EW_LENGTH Number of data(length) is wrong. (The size of buffer is less than 256. ).
    EW_BUFFER Buffer empty/full
    Retry because the buffer is empty.
    EW_REJECT CNC is not in "Emergency" state.

    misc\cnc_sramgetend

    Indicates the termination of reading the S-RAM data from CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sramgetend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable or cnc_sramgetstart function has not been executed
    EW_DATA All the S-RAM data is not read.
    The cnc_sramgetend function was called in the state of argument stat=1, at cnc_sramget function.
    EW_REJECT CNC is not in "Emergency" state.

    misc\cnc_sramgetstart

    Indicates the start of reading the S-RAM data from CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sramgetstart(unsigned short FlibHndl, char *name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    name in

    The name of the S-RAM data which you want to read.
    Specify the S-RAM data name (sysname) acquired by cnc_getsraminfo function.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_BUSY Busy
    cnc_sramgetstart function has been already executed.
    Terminate a reading process by using cnc_sramgetend function.
    EW_DATA The S-RAM data of specified name(name) does not exist.
    EW_REJECT CNC is not in "Emergency" state.
    EW_PASSWD Specified S-RAM data cannot be read because the data is protected.

    misc\cnc_statinfo

    Reads the status information of CNC. The various information is stored in each member of "ODBST".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_statinfo(unsigned short FlibHndl, ODBST *statinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    statinfo out Pointer to the ODBST structure including the status information of CNC.

    There is difference at the structure between Series 15/15i, Series 16/18/21/16i/18i/21i/0i/30i/Power Mate i/PMi-A.

    • Series 15/15i
    • typedef struct odbst {
           short  dummy[2];  /* Not used                           */
           short  aut;       /* AUTOMATIC mode selection           */
           short  manual;    /* MANUAL mode selection              */
           short  run;       /* Status of automatic operation      */
           short  edit;      /* Status of program editing          */
           short  motion;    /* Status of axis movement,dwell      */
           short  mstb;      /* Status of M,S,T,B function         */
           short  emergency; /* Status of emergency                */
           short  write;     /* Status of writing backupped memory */
           short  labelskip; /* Status of label skip               */
           short  alarm;     /* Status of alarm                    */
           short  warning;   /* Status of warning                  */
           short  battery;   /* Status of battery                  */
      } ODBST ;
      

      * In case of multi-path, there are difference of path for only Status of axis movement, dwell", and Status of M,S,T,B function". As for the other status, there is no difference.

      aut
      AUTOMATIC mode selection
      0 : ****(No selection)
      1 : MDI
      2 : TAPE(Series 15), DNC(Series 15i)
      3 : MEMory
      4 : EDIT
      5 : TeacH IN
      manual
      MANUAL mode selection
      0 : ***(No selection)
      1 : REFerence
      2 : INC·feed
      3 : HaNDle
      4 : JOG
      5 : AnGular Jog
      6 : Inc+Handl
      7 : Jog+Handl
      run
      Status of automatic operation
      0 : STOP
      1 : HOLD
      2 : STaRT
      3 : MSTR(jog mdi)
      4 : ReSTaRt(not blinking)
      Except under manual mode and under cutter radius compensation outside corner
      5 : PRSR(program restart)
      6 : NSRC(sequence number search)
      7 : ReSTaRt(blinking)
      Under manual mode or under cutter radius compensation outside corner
      8 : ReSET
      9 : (Not used)
      10 : (Not used)
      11 : (Not used)
      12 : (Not used)
      13 : HPCC(during RISC operation)
      edit
      Status of program editing
      0 : ****(Not editing)
      1 : EDIT
      2 : SeaRCH
      3 : VeRiFY
      4 : CONDense
      5 : READ
      6 : PuNCH
      motion
      Status of axis movement,dwell
      0 : ***
      1 : MoTioN
      2 : DWeLl
      3 : Wait (waiting:only TT)
      mstb
      Status of M,S,T,B function
      0 : ***
      1 : FIN
      emergency
      Status of emergency
      0 : (Not emergency)
      1 : EMerGency
      write
      Status of writing backupped memory
      0 : (Not writing)
      1 : @(writing)
      labelskip
      Status of label skip
      0 : Label SKip
      1 : (Not label skip)
      alarm
      Status of alarm
      0 : (No alarm)
      1 : ALarM
      warning
      Status of warning
      0 : (No warning)
      1 : WaRNing
      battery
      Status of battery
      0 : (Normal)
      1 : BATtery low(backupped memory)
      2 : BATtery low(absolute position detector)

    • Series 16/18/21, 16i/18i/21i, 0i, 30i/31i/32i, Power Mate i, PMi-A
    • * In case of multi-path, all status exist for each path.

      typedef struct odbst {
           short  hdck ;        /* Status of manual handle re-trace */
           short  tmmode ;      /* T/M mode selection              */
           short  aut ;         /* AUTOMATIC/MANUAL mode selection */
           short  run ;         /* Status of automatic operation   */
           short  motion ;      /* Status of axis movement,dwell   */
           short  mstb ;        /* Status of M,S,T,B function      */
           short  emergency ;   /* Status of emergency             */
           short  alarm ;       /* Status of alarm                 */
           short  edit ;        /* Status of program editing       */
      } ODBST ;
      
      hdck (30i/31i/32i, 0i-D/F only)
      Status of manual handle re-trace
      0 : Invalid of manual handle re-trace
      1 : M.H.RTR.(Manual handle re-trace)
      2 : NO RVRS.(Backward movement prohibition)
      3 : NO CHAG.(Direction change prohibition)
      tmmode
      T/M mode selection (only with compound machining function)
      0 : T mode
      1 : M mode
      aut
      AUTOMATIC/MANUAL mode selection
      0 : MDI
      1 : MEMory
      2 : ****
      3 : EDIT
      4 : HaNDle
      5 : JOG
      6 : Teach in JOG
      7 : Teach in HaNDle
      8 : INC·feed
      9 : REFerence
      10 : ReMoTe
      run
      Status of automatic operation
      0 : ****(reset)
      1 : STOP
      2 : HOLD
      3 : STaRT
      4 : MSTR(during retraction and re-positioning of tool retraction and recovery, and operation of JOG MDI)
      motion
      Status of axis movement, dwell
      0 : ***
      1 : MoTioN
      2 : DWeLl
      mstb
      Status of M,S,T,B function
      0 : ***(Others)
      1 : FIN
      emergency
      Status of emergency
      0 : (Not emergency)
      1 : EMerGency
      2 : ReSET
      3 : WAIT(FS35i only)
      alarm
      Status of alarm
      0 : ***(Others)
      1 : ALarM
      2 : BATtery low
      3 : FAN(NC or Servo amplifier)
      4 : PS Warning
      5 : FSsB warning
      6 : INSulate warning
      7 : ENCoder warning
      8 : PMC alarm
      edit
      Status of others

      In case of 0i-D, the meaning of status(16,21,23,42,44,46) is changed according to the parameter No.13104#0.(same as 30i)

      • M series (including Power Mate i)
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE((during comparing)
        6 : Label SKip(label skip status)(30i, 0i-D/F are unused.)
        7 : ReSTaRt(during program restart)
        8 : HPCC(during RISC operation)(FS16i/18i only)
        9 : PTRR(during tool retraction and recovery mode)
        10 : RVRS(during retracing)
        11 : RTRY(during reprogressing)
        12 : RVED(end of retracing)
        13 : HANDLE(during handle overlapping)(30i, 0i-D/F are unused.)
        14 : OFfSeT(during tool length measurement mode)
        15 : Work OFfSet(during work zero point measurement mode)
        16 : AICC(during AI coutour control)
        AICC(during AI coutour control)(0i-D:No.13104#0=1)
        AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
        17 : MEmory-CHecK(checking tape memory)(30i, 0i-D/F are unused.)
        18 : CusToMer´s BoarD(during customer's board control)(30i, 0i-D/F are unused.)
        19 : SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
        20 : AI NANO(during AI nano contour control)(30i, 0i-D/F are unused.)
        21 : AI APC(during AI advanced preview control) (21i-MA)(0i-D:No.13104#0=1)
        22 : MBL APC(during multi blocks advanced preview control) (0i-MA only)
        23 : NANO HP(Running of AI High-precision Contour Control)
        AICC 2(during AI coutour control II)(30i, 0i-F)
        AICC 2(during AI coutour control II)(0i-D:No.13104#0=1)
        AICC(during AI coutour control)(0i-D:No.13104#0=0)
        24 : AI HPCC(Running of AI Nano High-precision Contour Control)
        25 : 5-AXIS(Running of 5-axes machining)
        26 : LEN(change the manual active offset value:length offset change mode)
        27 : RAD(change the manual active offset value:radius offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(16i/18i/21i,0i-C)
        APC(Advanced Preview Control)(0i-D:No.13104#0=1)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D:No.13104#0=0)
        45 : S-TCP(during smooth TCP)(30i, 0i-F)
        46 : AICC 2(during AI coutour control II)(0i-D:No.13104#0=0)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)
      • T series
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE(during comparing)
        6 : Label SKip(label skip status)(30i, 0i-D/F are unused.)
        7 : OFfSeT(during writing mode of tool length compensation amount)
        8 : Work ShiFT(during writing mode of work shift amount)
        9 : ReSTaRt(during program restart)
        10 : 16i:(Not used), 30i, 0i-F:RVRS(during retracing)
        11 : 16i:(Not used), 30i, 0i-F:RTRY(during reprogressing)
        12 : 16i:(Not used), 30i, 0i-F:RVED(end of retracing)
        13 : (Not used)
        14 : PTRR(during tool retraction and recovery mode)
        15 : (Not used)
        16 : AICC(during AI coutour control)
        AICC(during AI coutour control)(0i-D:No.13104#0=1)
        AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
        17 : MEmory-CHecK(checking tape memory)(30i, 0i-D/F are unused.)
        18 : (Not used)
        19 : SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
        20 : AI NANO(during AI nano contour control)(30i, 0i-D/F are unused.)
        21 : HPCC(during RISC operation)
        22 : (Not used)
        23 : NANO HP(Running of AI High-precision Contour Control)
        AICC 2(during AI coutour control II)(30i, 0i-F)
        AICC 2(during AI coutour control II)(0i-D:No.13104#0=1)
        AICC(during AI coutour control)(0i-D:No.13104#0=0)
        24 : AI HPCC(Running of AI Nano High-precision Contour Control)
        25 : 5-AXIS(Running of 5-axes machining)
        26 : OFSX(change the manual active offset value:X-axis offset change mode)
        27 : OFSZ(change the manual active offset value:Z-axis offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        29 : OFSY(change the manual active offset value:Y-axis offset change mode)
        31 : TOFS(change the manual active offset value:Tool offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(16i/18i/21i,0i-C)
        APC(Advanced Preview Control)(0i-D:No.13104#0=1)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D:No.13104#0=0)
        45 : S-TCP(during smooth TCP)(30i, 0i-F)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)

    • Series 16i/18i-W
    • typedef struct odbst {
           short  dummy[2] ;    /* Not used                        */
           short  aut ;         /* AUTOMATIC/MANUAL mode selection */
           short  run ;         /* Status of automatic operation   */
           short  motion ;      /* Status of axis movement,dwell   */
           short  mstb ;        /* Status of M,S,T,B function      */
           short  emergency ;   /* Status of emergency             */
           short  alarm ;       /* Status of alarm                 */
           short  edit ;        /* Status of program editing       */
      } ODBST ;
      
      aut
      AUTOMATIC/MANUAL mode selection
      0 : MDI
      1 : MEM
      3 : EDT
      4 : HAND
      5 : JOG
      10 : TAPE
      run
      Status of automatic operation
      0 : NOT READY
      1 : M-READY
      2 : C-START
      3 : F-HOLD
      4 : B-STOP
      motion
      Status of axis movement, dwell
      0 : ****
      1 : CMTN
      2 : CDWL
      mstb
      Status of M,S,T,B function
      0 : ****
      1 : CFIN
      emergency
      (Not used)
      alarm
      Status of alarm
      0 : ****(Not emergency)
      1 : ALARM
      2 : BATTERY LOW
      edit
      Status of program editing
      0 : ****(Not editing)
      1 : EDITING(during search)
      2 : SEARCH(during search)
      3 : RESTART(during restart)
      4 : RETRACE(during retrace)

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    statinfo out Pointer to the ODBST structure including the status information of CNC.

      * In case of multi-path, all status exist for each path.

      typedef struct odbst {
           short  hdck ;        /* Status of manual handle re-trace */
           short  tmmode ;      /* T/M mode selection              */
           short  aut ;         /* AUTOMATIC/MANUAL mode selection */
           short  run ;         /* Status of automatic operation   */
           short  motion ;      /* Status of axis movement,dwell   */
           short  mstb ;        /* Status of M,S,T,B function      */
           short  emergency ;   /* Status of emergency             */
           short  alarm ;       /* Status of alarm                 */
           short  edit ;        /* Status of program editing       */
      } ODBST ;
      
      hdck
      Status of manual handle re-trace
      0 : Invalid of manual handle re-trace
      1 : M.H.RTR.(Manual handle re-trace)
      2 : NO RVRS.(Backward movement prohibition)
      3 : NO CHAG.(Direction change prohibition)
      tmmode
      T/M mode selection (only with compound machining function)
      0 : T mode
      1 : M mode
      aut
      AUTOMATIC/MANUAL mode selection
      0 : MDI
      1 : MEMory
      2 : ****
      3 : EDIT
      4 : HaNDle
      5 : JOG
      6 : Teach in JOG
      7 : Teach in HaNDle
      8 : INC·feed
      9 : REFerence
      10 : ReMoTe
      run
      Status of automatic operation
      0 : ****(reset)
      1 : STOP
      2 : HOLD
      3 : STaRT
      4 : MSTR(during retraction and re-positioning of tool retraction and recovery, and operation of JOG MDI)
      motion
      Status of axis movement, dwell
      0 : ***
      1 : MoTioN
      2 : DWeLl
      mstb
      Status of M,S,T,B function
      0 : ***(Others)
      1 : FIN
      emergency
      Status of emergency
      0 : (Not emergency)
      1 : EMerGency
      2 : ReSET
      alarm
      Status of alarm
      0 : ***(Others)
      1 : ALarM
      2 : BATtery low
      edit
      Status of others
      • M series (including Power Mate i)
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE((during comparing)
        6 : (Not used)
        7 : ReSTaRt(during program restart)
        8 : HPCC(during RISC operation)
        9 : PTRR(during tool retraction and recovery mode)
        10 : RVRS(during retracing)
        11 : RTRY(during reprogressing)
        12 : RVED(end of retracing)
        13 : (Not used)
        14 : OFfSeT(during tool length measurement mode)
        15 : Work OFfSet(during work zero point measurement mode)
        16 : AICC(during AI coutour control)(30i)
        AI APC(during AI advanced preview control)(0i-D)
        17 : (Not used)
        18 : (Not used)
        19 : (Not used)
        20 : (Not used)
        21 : AI APC(during AI advanced preview control)
        22 : MBL APC(during multi blocks advanced preview control)
        23 : AICC 2(during AI coutour control II)(30i)
        AICC(during AI coutour control)(0i-D)
        24 : AI HPCC(Running of AI Nano High-precision Contour Control)
        25 : 5-AXIS(Running of 5-AXIS machining)
        26 : LEN(change the manual active offset value:length offset change mode)
        27 : RAD(change the manual active offset value:radius offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(16i/18i/21i,0i-C)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D)
        45 : S-TCP(during smooth TCP)(30i)
        46 : AICC 2(during AI coutour control II)(0i-D)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)
      • T series
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE(during comparing)
        6 : (Not used)
        7 : OFfSeT(during writing mode of tool length compensation amount)
        8 : Work ShiFT(during writing mode of work shift amount)
        9 : ReSTaRt(during program restart)
        10 : RVRS(during retracing)
        11 : RTRY(during reprogressing)
        12 : RVED(end of retracing)
        13 : (Not used)
        14 : PTRR(during tool retraction and recovery mode)
        15 : (Not used)
        16 : AICC1(during AI coutour control)(30i)
        17 : (Not used)
        18 : (Not used)
        19 : (Not used)
        20 : (Not used)
        21 : (Not used)
        22 : (Not used)
        23 : AICC 2(during AI coutour control II)(30i)
        26 : OFSX(change the manual active offset value:X-axis offset change mode)
        27 : OFSZ(change the manual active offset value:Z-axis offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        29 : OFSY(change the manual active offset value:Y-axis offset change mode)
        31 : TOFS(change the manual active offset value:Tool offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(16i/18i/21i,0i-C)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D)
        45 : S-TCP(during smooth TCP)(30i)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)


    ERRORS

    Code Description

    misc\cnc_statinfo2

    Reads the status information of CNC. The various information is stored in each member of "ODBST2".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_statinfo2(unsigned short FlibHndl, ODBST2 *statinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    statinfo out Pointer to the ODBST structure including the status information of CNC.

      * In case of multi-path, all status exist for each path.

      typedef struct odbst2 {
          short  hdck ;        /* Status of manual handle re-trace */
          short  tmmode ;      /* T/M mode selection              */
          short  aut ;         /* AUTOMATIC/MANUAL mode selection  */
          short  run ;         /* Status of automatic operation    */
          short  motion ;      /* Status of axis movement,dwell    */
          short  mstb ;        /* Status of M,S,T,B function       */
          short  emergency ;   /* Status of emergency              */
          short  alarm ;       /* Status of alarm                  */
          short  edit ;        /* Status of program editing        */
          short  warning;      /* Status of wraning                */
          short  o3dchk;       /* Status of 3D interference mode   */
          short  ext_opt;      /* Status of option                 */
          short  restart;      /* Status of restart after program editing */
      } ODBST2 ;
      
      hdck
      Status of manual handle re-trace
      0 : Invalid of manual handle re-trace
      1 : M.H.RTR.(Manual handle re-trace)
      2 : NO RVRS.(Backward movement prohibition)
      3 : NO CHAG.(Direction change prohibition)
      tmmode
      T/M mode selection (only with compound machining function)
      0 : T mode
      1 : M mode
      aut
      AUTOMATIC/MANUAL mode selection
      0 : MDI
      1 : MEMory
      2 : ****
      3 : EDIT
      4 : HaNDle
      5 : JOG
      6 : Teach in JOG
      7 : Teach in HaNDle
      8 : INC·feed
      9 : REFerence
      10 : ReMoTe
      run
      Status of automatic operation
      0 : ****(reset)
      1 : STOP
      2 : HOLD
      3 : STaRT
      4 : MSTR(during retraction and re-positioning of tool retraction and recovery, and operation of JOG MDI)
      motion
      Status of axis movement, dwell
      0 : ***
      1 : MoTioN
      2 : DWeLl
      mstb
      Status of M,S,T,B function
      0 : ***(Others)
      1 : FIN
      emergency
      Status of emergency
      0 : (Not emergency)
      1 : EMerGency
      2 : ReSET
      3 : WAIT(FS35i only)
      alarm
      Status of alarm
      0 : ***(Others)
      1 : ALarM
      2 : BATtery low
      3 : FAN(NC or Servo amplifier)
      4 : PS Warning
      5 : FSsB warning
      6 : LeaKaGe warning
      7 : ENCoder warning
      8 : PMC alarm
      edit
      Status of others

      In case of 0i-D, the meaning of status(16,21,23,42,44,46) is changed according to the parameter No.13104#0.(same as 30i)

      • M series
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE((during comparing)
        6 : Label SKip(label skip status)(30i, 0i-D/F are unused.)
        7 : ReSTaRt(during program restart)
        9 : PTRR(during tool retraction and recovery mode)
        10 : RVRS(during retracing)
        11 : RTRY(during reprogressing)
        12 : RVED(end of retracing)
        13 : HANDLE(during handle overlapping)(30i, 0i-D/F are unused.)
        14 : OFfSeT(during tool length measurement mode)
        15 : Work OFfSet(during work zero point measurement mode)
        16 : AICC(during AI coutour control)(30i, 0i-F)(0i-D:No.13104#0=1)
        AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
        17 : MEmory-CHecK(checking tape memory)(30i, 0i-D/F are unused.)
        18 : CusToMer´s BoarD(during customer's board control)(30i, 0i-D/F are unused.)
        19 : SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
        20 : AI NANO(during AI nano contour control)(30i, 0i-D/F are unused.)
        21 : AI APC(during AI advanced preview control)(0i-D:No.13104#0=1)
        23 : AICC 2(during AI coutour control II)(30i, 0i-F)(0i-D:No.13104#0=1)
        AICC(during AI coutour control)(0i-D:No.13104#0=0)
        26 : LEN(change the manual active offset value:length offset change mode)
        27 : RAD(change the manual active offset value:radius offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(0i-D:No.13104#0=1)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D:No.13104#0=0)
        45 : S-TCP(during smooth TCP)(30i, 0i-F)
        46 : AICC 2(during AI coutour control II)(0i-D:No.13104#0=0)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)
      • T series
        0 : ****(Not editing)
        1 : EDIT(during editing)
        2 : SeaRCH(during searching)
        3 : OUTPUT(during output)
        4 : INPUT(during input)
        5 : COMPARE(during comparing)
        6 : Label SKip(label skip status)(30i, 0i-D/F are unused.)
        7 : OFfSeT(during writing mode of tool length compensation amount)
        8 : Work ShiFT(during writing mode of work shift amount)
        9 : ReSTaRt(during program restart)
        10 : RVRS(during retracing)
        11 : RTRY(during reprogressing)
        12 : RVED(end of retracing)
        13 : (Not used)
        14 : PTRR(during tool retraction and recovery mode)
        15 : (Not used)
        16 : AICC(during AI coutour control)(30i, 0i-F)(0i-D:No.13104#0=1)
        AI APC(during AI advanced preview control)(0i-D:No.13104#0=0)
        17 : MEmory-CHecK(checking tape memory)(30i, 0i-D/F are unused.)
        18 : (Not used)
        19 : SAVE(saving fine torque sensing data)(30i, 0i-D/F are unused.)
        20 : AI NANO(during AI nano contour control)(30i, 0i-D/F are unused.)
        21 : (Not used)
        22 : (Not used)
        23 : AICC 2(during AI coutour control II)(30i, 0i-F)(0i-D:No.13104#0=1)
        AICC(during AI coutour control)(0i-D:No.13104#0=0)
        26 : OFSX(change the manual active offset value:X-axis offset change mode)
        27 : OFSZ(change the manual active offset value:Z-axis offset change mode)
        28 : WZR(change the manual active offset value:workpiece origin offset change mode)
        29 : OFSY(change the manual active offset value:Y-axis offset change mode)
        31 : TOFS(change the manual active offset value:Tool offset change mode)
        39 : TCP(during tool center point control of 5-axes machining)
        40 : TWP(during tilted working plane command)
        41 : TCP+TWP(during tool center point control of 5-axes machining and tilted working plane command)
        42 : APC(Advanced Preview Control)(0i-D:No.13104#0=1)
        43 : PRG-CHK(High speed program check)
        44 : APC(Advanced Preview Control)(0i-D:No.13104#0=0)
        45 : S-TCP(during smooth TCP)(30i, 0i-F)
        59 : ALLSAVE(High speed program management:the programs saving in progress)
        60 : NOTSAVE(High speed program management:by the programs not saved status)
      warning
      Status of warning
      0 : (No warning)
      1 : WaRNing(Start from middle of program)
      o3dchk
      o3dchk Status of 3D interference mode
      0 : Not 3D interference mode
      1 : 3D interference mode by Built-in 3D interference check
      2 : 3D interference mode by presonal computer function
      ext_opt
      Status of option
      0 : Normal
      2 : Temporary setting mode
      3 : Waiting of certification
      restart
      Status of auto running restart after program editing.
      0 : It is either of the following status.
      - Program did not edit.
      - Parameter No.10330#7 which is display the message for confirmation of auto running restart is not effective.
      - CNC does not support this function.
      1 : - Program is edited.


    ERRORS

    Code Description

    misc\cnc_sysconfig

    Reads the CNC system configuration information.

    Various information is stored in each member of ODBSYSC.

    This function cannot be used on Series 15i, 16i/18i/21i, 0i-B and 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sysconfig(unsigned short FlibHndl, ODBSYSC *sysinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    syssoft out

    Pointer to the ODBSYSC structure including the CNC configuration information.
    There is difference at the structure between Series 15, Series 16/18/21, 0i-A.

  • The ODBSYSC structure for Series 15 is as follows.
  • typedef struct  odbsysc {
        char    slot_no_p[16];    /* Physical slot number */
        char    slot_no_l[16];    /* Logical slot number */
        short   mod_id[16];       /* Module ID */
        short   soft_id[16];      /* Software ID */
        char    s_series[16][5];  /* Software series */
        char    s_version[16][5]; /* Software version */
        char    sys_id[16];       /* System ID of CNC(CNC series name)*/
        char    sys_ser[5];       /* System series of CNC */
        char    sys_ver[5];       /* System version of CNC */
        char    basic_ver[5];     /* Version of CNC basic software */
        char    opta1_ver[5];     /* Version of CNC option 1 software */
        char    opta2_ver[5];     /* Version of CNC option 2 software */
        char    opta3_ver[5];     /* Version of CNC option 3 software */
        char    opta4_ver[5];     /* Version of CNC option 4 software */
        char    sub_ver[5];       /* Version of CNC sub software */
        char    opts1_ver[5];     /* Version of CNC sub option 1 soft.*/
        char    tcopt_ver[5];     /* Version of TC option software */
        char    axis_ser[5];      /* Series of axis software */
        char    axis_ver[5];      /* Version of axis software */
        char    help_ser[5];      /* Series of HELP ROM */
        char    help_ver[5];      /* Version of HELP ROM */
        char    boot_ser[5];      /* Series of BOOT ROM */
        char    boot_ver[5];      /* Version of BOOT ROM */
        char    servo_ser[5];     /* Series of servo software */
        char    servo_ver[5];     /* Version of servo software */
        char    cmpl_ser[5];      /* Series of macro compiler */
        char    cmpl_ver[5];      /* Version of macro compiler */
        char    sral1_ser[5];     /* Series of 1st serial spindle */
        char    sral1_ver[5];     /* Version of 1st serial spindle */
        char    sral2_ser[5];     /* Series of 2nd serial spindle */
        char    sral2_ver[5];     /* Version of 2nd serial spindle */
        char    sral3_ser[5];     /* Series of 3rd serial spindle */
        char    sral3_ver[5];     /* Version of 3rd serial spindle */
        char    sral4_ser[5];     /* Series of 4th serial spindle */
        char    sral4_ver[5];     /* Version of 4th serial spindle */
        short   pcb_info[20];     /* Information of each board */
        short   pcb_note[20][16]; /* Modules built in each board */
    } ODBSYSC ;
    
    slot_no_p
    Physical slot number
    The physical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.The data subsequent to FFH are invalid.
      00H to 0FH : Primary slot number
      80H to 8FH : Secondary slot number
    slot_no_l
    Logical slot number
    The logical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid.
      00H to 0FH : logical slot number
    mod_id
    Module ID
    The module IDs of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.
    The data subsequent to FFH are invalid. 'XX' is internal information.
      XX3FH : Remote buffer
      XX45H : Graphic
      XX62H : CNC MAIN (High speed)
      XX63H : Additional axis/CNC SUB
      XX6BH : PMC-NB
      XX6CH : FAPT/CAP
      XX71H : CNC MAIN (Standard)
      XX74H : ROM cassette adapter
      XX77H : PMC-NA
      XX94H : MMC-IV
    soft_id
    Software ID
    The software IDs of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.
    The data subsequent to FFH are invalid.
      37H : CNC MAIN
      39H : Additional axis
      3AH : CNC SUB
      3CH : Remote buffer/DNC11
      3DH : PMC-NA
      40H : Graphic
      41H : ROM cassette adapter
      42H : PMC-NB
      44H : DNC1#2
      45H : FAPT
      4CH : TC
      4DH : CAP
      5EH : MMC-IV
    s_series
    Software series
    The software series of the modules which are built in the slots are stored in ASCII code in order of their position.
    s_version
    Software version
    The software version of the modules which are built in the slots are stored in ASCII code in order of their position.
    sys_id
    CNCSystem ID of CNC (CNC series name)
    sys_ser
    System series of CNC
    sys_ver
    System version of CNC
    basic_ver
    Version of CNC basic software
    opta1_ver
    Version of CNC option 1 software
    opta2_ver
    Version of CNC option 2 software
    opta3_ver
    Version of CNC option 3 software
    opta4_ver
    Version of CNC option 4 software
    sub_ver
    Version of CNC sub software
    opts1_ver
    Version of CNC sub option 1 software
    tcopt_ver
    Version of TC option software
    axis_ser
    Series of axis software
    axis_ver
    Version of axis software
    help_ser
    Series of HELP ROM
    help_ver
    Version of HELP ROM
    boot_ser
    Series of BOOT ROM
    boot_ver
    Version of BOOT ROM
    servo_ser
    Series of servo software
    servo_ver
    Version of servo software
    cmpl_ser
    Series of macro compiler
    cmpl_ver
    Version of macro compiler
    sral1_ser
    Series of 1st serial spindle
    sral1_ver
    Version of 1st serial spindle
    sral2_ser
    Series of 2nd serial spindle
    sral2_ver
    Version of 2nd serial spindle
    sral3_ser
    Series of 3rd serial spindle
    sral3_ver
    Version of 3rd serial spindle
    sral4_ser
    Series of 4th serial spindle
    sral4_ver
    Version of 4th serial spindle

    The data from 's_series' to 'sral4_ver' are stored in ASCII code, and the last data of each member is 'NULL' code.

    pcb_info
    The information of each board
      pcb_info[0] (MAIN)
      #0 : F-ROM
      #1 : D-RAM
      #2 : High Speed S-RAM
      #3 : File S-RAM
      #4 : Peripheral
      #5 : CRTC
      #6 : Spindle
      #7 : 1st,2nd axis Servo
      #8 : 3rd,4th axis Servo

      pcb_info[1] (SUB)

      #0 : D-RAM
      #1 : High Speed S-RAM
      #2 : File S-RAM
      #3 : Spindle
      #4 : 5th,6th axis Servo
      #5 : 7th,8th axis Servo
      #6 : Analog I/O

      pcb_info[2] (ADDITIONAL AXIS 1)

      #0 : Spindle
      #1 : 5th,6th axis Servo
      #2 : 7th,8th axis Servo
      #3 : Analog I/O

      pcb_info[3] (ADDITIONAL AXIS 2)

      #0 : 9th,10th axis Servo

      pcb_info[4] (PMC-NA)

      #0 : PMC CPU
      #1 : PMC Engine
      #2 : Option D-RAM
      #3 : F-ROM

      pcb_info[5] (PMC-NB)

      #0 : PMC CPU
      #1 : PMC Engine
      #2 : Option D-RAM
      #3 : F-ROM
      #4 : EPROM

      pcb_info[6] (GRAPHIC)

      #0 : Graphic CPU
      #1 : CRTC
      #2 : Graphic Engine 1
      #3 : Graphic Engine 2

      pcb_info[7] (REMOTE BUFFER/DNC2)

      #0 : Communication

      pcb_info[8] (DNC1)

      #0 : Communication

      pcb_info[9] (CAP/FAPT)

      #0 : CAP/FAPT CPU
      #1 : EPROM
      #2 : S-RAM
      #3 : D-RAM

      pcb_info[10] (RISC R4000)

      #0 : EPROM
      #1 : S-RAM
      #2 : D-RAM1
      #3 : D-RAM2

      pcb_info[11] (reserve)

      pcb_info[12] (reserve)

      pcb_info[13] (reserve)

      pcb_info[14] (AXIS CPU 1)

      #0 : D-RAM
      #1 : Spindle
      #2 : 1st,2nd axis Servo
      #3 : 3rd,4th axis Servo
      #4 : DBL 1
      #5 : DBL 2

      pcb_info[15] (AXIS CPU 2)

      #0 : D-RAM
      #1 : Spindle
      #2 : 5th,6th axis Servo
      #3 : 7th,8th axis Servo
      #4 : DBL 1
      #5 : DBL 2

      pcb_info[16] (AXIS CPU 3)

      #0 : D-RAM
      #1 : Spindle
      #2 : 9th,10th axis Servo
      #3 : 11th,12th axis Servo
      #4 : DBL 1
      #5 : DBL 2

      pcb_info[17] (AXIS CPU 4)

      #0 : D-RAM
      #1 : Spindle
      #2 : 13th,14th axis Servo
      #3 : 15th,16th axis Servo
      #4 : DBL 1
      #5 : DBL 2

      pcb_info[18] (reserve)

      pcb_info[19] (reserve)

    pcb_note
    Modules built in each board
    • CNC MAIN
      • pcb_note[0][0] --- Capacity of program memory module (F-ROM)
        -1 : Not exist
        0 : Others
        1 : 2MB
        2 : 4MB
        3 : 6MB
        4 : 8MB
        5 : 10MB
        6 : 12MB
        7 : 14MB

        pcb_note[0][1] --- Capacity of main memory module (D-RAM)

        -1 : Not exist
        0 : Others
        1 : 2MB
        2 : 4MB
        3 : 6MB
        4 : 8MB

        pcb_note[0][2] --- Capacity of main memory module (HS-RAM)

        -1 : Not exist
        0 : Others
        1 : TYPE-A
        2 : TYPE-B
        3 : TYPE-C
        4 : TYPE-D
        5 : TYPE-E
        6 : TYPE-F
        7 : TYPE-G

        pcb_note[0][3] --- Capacity of TAPE memory module (S-RAM)

        -1 : Not exist
        0 : Others
        1 : 64K
        2 : 128K
        3 : 256K
        4 : 320K
        5 : 512K
        6 : 1M
        7 : 2M

        pcb_note[0][4] --- Existence of peripheral module

        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[0][5] --- Type of CRTC module

        -1 : Not exist
        0 : Others
        1 : 14"
        2 : 9"
        3 : 10"

        pcb_note[0][6] --- Type of spindle control module

        -1 : Not exist
        0 : Others
        1 : Serial
        2 : Serial+High speed DI/DO
        3 : Analog
        4 : Analog+High speed DI/DO

        pcb_note[0][7] --- Type of axis control module

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[0][8] --- Type of axis control module

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

    • CNC SUB
      • pcb_note[1][0] --- Capacity of SUB CPU memory module 1 (D-RAM)
        -1 : Not exist
        0 : Others
        1 : 1MB
        2 : 1.25MB
        3 : 2MB
        4 : 4MB
        5 : 6MB
        6 : 8MB

        pcb_note[1][1] --- Capacity of SUB CPU memory module 1 (HS-RAM)

        -1 : Not exist
        0 : Others
        1 : TYPE-A
        2 : TYPE-B
        3 : TYPE-C
        4 : TYPE-D
        5 : TYPE-E
        6 : TYPE-F
        7 : TYPE-G

        pcb_note[1][2] --- Capacity of SUB CPU memory module 2 (S-RAM)

        -1 : Not exist
        0 : Others
        1 : 64K
        2 : 128K
        3 : 256K
        4 : 320K
        5 : 512K
        6 : 1M
        7 : 2M

        pcb_note[1][3] --- Type of spindle control module

        -1 : Not exist
        0 : Others
        1 : Serial
        2 : Serial+High speed DI/DO
        3 : Analog
        4 : Analog+High speed DI/DO

        pcb_note[1][4] --- Type of axis control module (5th, 6th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[1][5] --- Type of axis control module (7th, 8th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[1][6] --- Type of analog I/O module

        -1 : Not exist
        0 : Others
        1 : Port-B+I/O
        2 : I/O
        3 : Port-B+Out
        4 : Out
        5 : Port-B+In
        6 : In
        7 : Port-B

    • Additional axis 1
      • pcb_note[2][0] --- Type of spindle control module
        -1 : Not exist
        0 : Others
        1 : Serial
        2 : Serial+High speed DI/DO
        3 : Analog
        4 : Analog+High speed DI/DO

        pcb_note[2][1] --- Type of axis control module (5th, 6th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[2][2] --- Type of axis control module (7th, 8th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[2][3] --- Type of analog I/O module

        -1 : Not exist
        0 : Others
        1 : Port-B+I/O
        2 : I/O
        3 : Port-B+Out
        4 : Out
        5 : Port-B+In
        6 : In
        7 : Port-B

    • Additional axis 2
      • pcb_note[3][0] --- Type of axis control module (9th, 10th)
        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

    • PMC-NA
      • pcb_note[4][0] --- Existence of CPU module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[4][1] --- Type of PMC engine module

        -1 : Not exist
        0 : Others
        1 : BOC2

        pcb_note[4][2] --- Option D-RAM module

        -1 : Not exist
        0 : Others
        1 : 512K
        2 : 1M
        3 : 2M

        pcb_note[4][3] --- Capacity of program memory module (F-ROM)

        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.5M
        3 : 2M

    • PMC-NB
      • pcb_note[5][0] --- Existence of CPU module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[5][1] --- Type of PMC engine module

        -1 : Not exist
        0 : Others
        1 : PMP

        pcb_note[5][2] --- Option D-RAM module

        -1 : Not exist
        0 : Others
        1 : 512K
        2 : 1M
        3 : 2M

        pcb_note[5][3] --- Capacity of program memory module (F-ROM)

        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.5M
        3 : 2M

        pcb_note[5][4] --- Capacity of EPROM module

        -1 : Not exist
        0 : Others
        1 : 512K
        2 : 768K
        3 : 1M

    • GRAPHIC
      • pcb_note[6][0] --- Existence of CPU module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[6][1] --- Type of character control module

        -1 : Not exist
        0 : (reserve)
        1 : 14"
        2 : 9"
        3 : 10"

        pcb_note[6][2] --- Existence of graphic engine module 1

        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[6][3] --- Existence of graphic engine module 2

        -1 : Not exist
        0 : (reserve)
        1 : Exists

    • REMORT BUFFER/DNC2
      • pcb_note[7][0] --- Existence of communication module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

    • DNC1
      • pcb_note[8][0] --- Existence of communication module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

    • CAP/FAPT
      • pcb_note[9][0] --- Existence of CPU module
        -1 : Not exist
        0 : (reserve)
        1 : Exists

        pcb_note[9][1] --- Capacity of EPROM module

        -1 : Not exist
        0 : Others
        1 : 128K
        2 : 256K
        3 : 512K
        4 : 576K
        5 : 1M

        pcb_note[9][2] --- Capacity of S-RAM module

        -1 : Not exist
        0 : Others
        1 : 128K
        2 : 256K
        3 : 512K
        4 : 576K
        5 : 1M

        pcb_note[9][3] --- Capacity of D-RAM module

        -1 : Not exist
        0 : Others
        1 : 128K
        2 : 256K
        3 : 512K
        4 : 1M

    • RISC
      • pcb_note[10][0] --- Capacity of EPROM module
        -1 : Not exist
        0 : Others
        1 : 512K
        2 : 1M

        pcb_note[10][1] --- Capacity of S-RAM module

        -1 : Not exist
        0 : Others
        1 : 512K
        2 : 1M

        pcb_note[10][2] --- Capacity of D-RAM module 1

        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 2M

        pcb_note[10][3] --- Capacity of D-RAM module 2

        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 2M

    • AXIS CPU 1
      • pcb_note[14][0] --- Capacity of axis CPU memory module (D-RAM)
        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.25M
        3 : 2M
        4 : 4M

        pcb_note[14][1] --- Type of spindle control module

        -1 : Not exist
        0 : Others
        1 : Selial
        2 : Serial+NZ
        3 : Analog
        4 : Analog+NZ

        pcb_note[14][2] --- Type of axis control module (1st, 2nd axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[14][3] --- Type of axis control module (3rd, 4th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[14][4] --- Type of error motion check module 1

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

        pcb_note[14][5] --- Type of error motion check module 2

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

    • AXIS CPU 2
      • pcb_note[15][0] --- Capacity of axis CPU memory module (D-RAM)
        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.25M
        3 : 2M
        4 : 4M

        pcb_note[15][1] --- Type of spindle control module

        -1 : Not exist
        0 : Others
        1 : Selial
        2 : Serial+NZ
        3 : Analog
        4 : Analog+NZ

        pcb_note[15][2] --- Type of axis control module (1st, 2nd axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[15][3] --- Type of axis control module (3rd, 4th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[15][4] --- Type of error motion check module 1

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

        pcb_note[15][5] --- Type of error motion check module 2

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

    • AXIS CPU 3
      • pcb_note[16][0] --- Capacity of axis CPU memory module (D-RAM)
        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.25M
        3 : 2M
        4 : 4M

        pcb_note[16][1] --- Type of spindle control module

        -1 : Not exist
        0 : Others
        1 : Selial
        2 : Serial+NZ
        3 : Analog
        4 : Analog+NZ

        pcb_note[16][2] --- Type of axis control module (1st, 2nd axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[16][3] --- Type of axis control module (3rd, 4th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[16][4] --- Type of error motion check module 1

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

        pcb_note[16][5] --- Type of error motion check module 2

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

    • AXIS CPU 4
      • pcb_note[17][0] --- Capacity of axis CPU memory module (D-RAM)
        -1 : Not exist
        0 : Others
        1 : 1M
        2 : 1.25M
        3 : 2M
        4 : 4M

        pcb_note[17][1] --- Type of axis control module

        -1 : Not exist
        0 : Others
        1 : Selial
        2 : Serial+NZ
        3 : Analog
        4 : Analog+NZ

        pcb_note[17][2] --- Type of axis control module (1st, 2nd axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[17][3] --- Type of axis control module (3rd, 4th axis)

        -1 : Not exist
        0 : Others
        1 : Piston lathe
        2 : Analog servo
        3 : Digital servo

        pcb_note[17][4] --- Type of error motion check module 1

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

        pcb_note[17][5] --- Type of error motion check module 2

        -1 : Not exist
        0 : Others
        1 : 2 Pos
        2 : 4 Pos

    • Reserved
      • 'pcb_note[11][0]' to 'pcb_note[11][15]',

        'pcb_note[12][0]' to 'pcb_note[12][15]',

        'pcb_note[13][0]' to 'pcb_note[13][15]',

        'pcb_note[18][0]' to 'pcb_note[18][15]',

        'pcb_note[19][0]' to 'pcb_note[19][15]' are reserved.



  • The ODBSYSC structure for Series 16/18/21, 0i-A is as follows.
  • typedef struct odbsysc {
         char    slot_no_p[16];     /* Physical slot number */
         char    slot_no_l[16];     /* Logical slot number */
         short   mod_id[16];        /* Module ID */
         short   soft_id[16];       /* Software ID */
         char    s_series[16][5];   /* Software series */
         char    s_version[16][5];  /* Software version */
         char    dummy[16];         /* Not used */
         short   m_rom;             /* Main-CPU CNC software installation status */
         short   s_rom;             /* Sub-CPU CNC software installation status */
         char    svo_soft[8];       /* Series and version of servo software */
         char    pmc_soft[6];       /* Series and version of PMC management software */
         char    lad_soft[6];       /* Series and version of Ladder software */
         char    mcr_soft[8];       /* Series and version of macro executor */
         char    spl1_soft[6];      /* Series and version of spindle software(1st spindle) */
         char    spl2_soft[6];      /* Series and version of spindle software(2nd spindle) */
         short   frmmin;            /* Capacity of FROM module (MAIN) */
         short   drmmin;            /* Capacity of DRAM module (MAIN) */
         short   srmmin;            /* Capacity of additional SRAM module (MAIN) */
         short   pmcmin;            /* Type of PMC module (MAIN) */
         short   crtmin;            /* Type of CRTC module (MAIN) */
         short   sv1min;            /* Existence of servo module (axis 1,2) (MAIN) */
         short   sv3min;            /* Existence of servo module (axis 3,4) (MAIN) */
         short   sicmin;            /* Existence of SIC (MAIN) */
         short   posmin;            /* Existence of position LSI (MAIN) */
         short   drmmrc;            /* Extended DRAM for management software (PMC-SC) */
         short   drmarc;            /* Capacity of DRAM for applications (PMC-SC) */
         short   pmcmrc;            /* Type of PMC module (PMC-SC) */
         short   dmaarc;            /* Existence of additional board for DMA (PMC-SC) */
         short   iopt;              /* Number of DI/DO points (I/O card) */
         short   hdiio;             /* Existence of LSI for high-speed skip (I/O card) */
         short   frmsub;            /* Capacity of FROM module (SUB) */
         short   drmsub;            /* Capacity of DRAM module (SUB) */
         short   srmsub;            /* Capacity of added SRAM module (SUB) */
         short   sv5sub;            /* Existence of servo module (axis 5,6) (SUB) */
         short   sv7sub;            /* Existence of servo module (axis 7,8) (SUB) */
         short   sicsub;            /* Existence of SIC (SUB) */
         short   possub;            /* Existence of position LSI (SUB) */
         short   hamsub;            /* Existence of high-speed skip and analog I/O (SUB) */
         short   gm2gr1;            /* Existence of graphic engine 2 */
         short   crtgr2;            /* Existence of CRTC module type (OPT-1)*/
         short   gm1gr2;            /* Existence of graphic module 1 (OPT-1)*/
         short   gm2gr2;            /* Existence of graphic module 2 (OPT-1)*/
         short   cmmrb;             /* Existence of communication module (OPT-1)*/
         short   sv5axs;            /* Existence of servo module (axis 5,6) (Axis card) */
         short   sv7axs;            /* Existence of servo module (axis 7,8) (Axis card) */
         short   sicaxs;            /* Existence of SIC (Axis card) */
         short   posaxs;            /* Existence of position LSI (Axis card)*/
         short   hanaxs;            /* Existence of high-speed skip and analog I/O (Axis card)*/
         short   romr64;            /* Capacity of the system EPROM (64bitRISC)*/
         short   srmr64;            /* Capacity of SRAM module   (64bitRISC)*/
         short   dr1r64;            /* Capacity of DRAM module 1 (64bitRISC)*/
         short   dr2r64;            /* Capacity of DRAM module 2 (64bitRISC)*/
         short   iopio2;            /* Number of DI/DO points (I/O card #2) */
         short   hdiio2;            /* Existence of LSI for high-speed skip (I/O card #2) */
         short   cmmrb2;            /* Existence of communication module (OPT-1 #2) */
         short   romfap;            /* Capacity of EPROM module (CAP2) */
         short   srmfap;            /* Capacity of SRAM module (CAP2) */
         short   drmfap;            /* Capacity of DRAM module (CAP2) */
    } ODBSYSC ;
    
    slot_no_p
    Physical slot number
    The physical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.The data subsequent to FFH are invalid.
      00H to 0FH : Primary slot number
      80H to 8FH : Secondary slot number
    slot_no_l
    Logical slot number
    The logical slot numbers of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH. The data subsequent to FFH are invalid.
      00H to 0FH : logical slot number
    mod_id
    Module ID
    The module IDs of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.
    The data subsequent to FFH are invalid. 'XX' is internal information.
      XX3FH : Remote buffer
      XX45H : Graphic(CAP-II)
      XX46H : I/O card
      XX6DH : CAP-III
      XX7FH : RISC(64bit)
      XX94H : MMC-IVV
      XX9AH : Graphic(standard)
      XX9DH : PMC-SC
      XXA7H : FS16B/Main(6 axes)
      XXC4H : I/O Link-2
      XXDDH : Power Mate i
      XXADH : FS18B/Main(4 axes)
      XXAEH : FS18B/Main(6 axes)
      XXB0H : FS16B/SUB
      XXB2H : FS16B/Main(4 axes)
      XXB4H : PMC-SB5/SB6
      XXB7H : FS18B/SUB
      XXB9H : FS16C/Main(6 axes)
      XXBAH : FS16C,18C/SUB
      XXBDH : FS18C/Main(6 axes)
    soft_id
    Software ID
    The software IDs of the modules which are built in the slots are stored in binary in order of their position. This array is terminated with FFH.
    The data subsequent to FFH are invalid.
      40H : CNC
      41H : PMC-SC
      42H : Internal I/O card
      43H : CNC SUB
      45H : Graphic(standard)
      46H : Graphic(CAP-II)
      49H : CAP-II
      4AH : Remote buffer
      4FH : PMC-SE
      5EH : MMC-IV,HSSB I/F
      67H : PMC-SB5/SB6
    s_series
    Software series
    Software series information is stored in ASCII code in order of slot numbers, first four bytes being used for each slot number, and next one byte is NULL.
    s_version
    Software version
    Software version information is stored in ASCII code in order of slot numbers, four bytes being used for each slot number, and next one byte is NULL.
    m_rom
    The relation between stored value and software installation is as follows.
    • Series 16/18
    • bit0 to 3 : BASIC
      bit4 to 7 : OPTION-A1
      bit8 to 11 : OPTION-A2
      Other bits : Not used
      - 0000FH → BASIC
      - 000FFH → BASIC + OPTION-A1
      - 00F0FH → BASIC + OPTION-A2
      - 00FFFH → BASIC + OPTION-A1 + OPTION-A2

    • Series 21
    • bit0 : BASIC
      bit1 : OPTION-A1
      bit2 : Macro library/application
      bit3 : Servo software
      Other bits : Not used
      - 00009H → BASIC + Servo software
      - 0000BH → BASIC + Servo software + OPTION-A1
      - 0000DH → BASIC + Servo software + Macro library/application
      - 0000FH → BASIC + Servo software + OPTION-A1 + Macro library/application

    • Series 0i-A
    • bit0 : BASIC
      bit1 : OPTION-A1
    s_rom
    Sub-CPU CNC software installation status
    For contents, see m_rom above.
    svo_soft
    Series and version of servo software
    This information item is stored in ASCII code. The first four bytes indicate the series, and the remaining four bytes indicate the version. It is impossible that this software is absent.
    pmc_soft
    Series and version of PMC management software
    This information item is stored in ASCII code. The first four bytes indicate the series, and the remaining two bytes indicate the version. It is impossible that this software is absent.
    lad_soft
    Series and version of Ladder software
    This information item is stored in ASCII code. The first four bytes indicate the series, and the remaining two bytes indicate the version. If this software does not exist, all of the 6 bytes are space(20H).
    mcr_soft
    Series and version of macro executor
    This information item is stored in ASCII. The four bytes from second byte indicate the series, and the subsequent two bytes indicate the version. If this software exists, the first byte is 5AH. The last byte is not used.
    spl1_soft
    Series and version of spindle software (1st spindle)
    This information item is stored in ASCII code. The first four bytes indicate the series, and the remaining two bytes indicate the version. If this software does not exist, all of the 6 bytes are space(20H).
    spl2_soft
    Series and version of spindle software (2nd sp.)
    This information item is stored in ASCII code. The first four bytes indicate the series, and the remaining two bytes indicate the version. If this software does not exist, all of the 6 bytes are space(20H).
    frmmin

    Capacity of FROM module (MAIN)
    • Series 16/18
    • -1 : Not exist
      0 : (reserve)
      1 : 2 (MB)
      2 : 4 (MB)
      3 : 6 (MB)
      4 : 8 (MB)
      5 : 10 (MB)
      6 : 12 (MB)
      7 : 4 (MB)
      8 : 3 (MB)
      9 : 2 (MB)
      10 : 6 (MB)
      11 : 8 (MB)
      12 : 10 (MB)
      13 : 12 (MB)
      14 : 14 (MB)
      15 : 1 (MB)
      16 : 1 (MB)
      17 : (reserve)
      18 : 4 (MB)
      19 : 8 (MB)

    • Series 21
    • 0 : 128KB + 4MB
      1 : (reserve)
      2 : 128KB + 6MB
      3 : 128KB + 2MB
      4 : 256KB + 4MB
      5 : (reserve)
      6 : 256KB + 6MB
      7 : 256KB + 2MB

    • Series 0i-A
    • 0 : 4MB
      1 : (reserve)
      2 : 6MB
      3 : 2MB
    drmmin
    • Series 16/18
    • Capacity of DRAM module (MAIN)
      -1 : Not exist
      0 : 4 (MB)
      1 : 2 (MB)
      2 : 1 (MB)
      3 : 6 (MB)
      4 : 16 (MB)
      5 : 8 (MB)
      6 : 4 (MB)
      7 : 24 (MB)

    • Series 21
    • Capacity of SRAM module and SPINDLE TYPE (MAIN)
      0 : SRAM 256KB + SIC
      1 : SRAM 256KB + POSITION LSI
      2 : SRAM 512KB + SIC
      3 : SRAM 512KB + POSITION LSI
      4 : SRAM 256KB + SIC + POSITION LSI
      5 : (reserve)
      6 : SRAM 512KB + SIC + POSITION LSI
      7 : (reserve)

    • Series 0i-A
    • Capacity of additional SRAM module (MAIN)
      0 : SRAM 256KB + SIC
      1 : SRAM 256KB + POSITION LSI
      2 : SRAM 512KB + SIC
      3 : SRAM 512KB + POSITION LSI
      4 to 7 : (reserve)
    srmmin
    • Series 16/18
    • Capacity of additional SRAM module (MAIN)
      -1 : Not exist
      0 : 1 (MB)
      1 : 512 (KB)
      2 : 2 (MB)
      3 : (reserve)
      4 : (reserve)
      5 : 768 (KB)
      6 : (reserve)
      7 : 2.25(MB)
      5 : (reserve)
      6 : 256 (KB)

    • Series 21
    • Existence of MATRIX DI/DO (MAIN)
      -1 : Not exist
      0 : Exists

    • Series 0i-A
    • Not used.
    pmcmin
    Existence of MATRIX DI/DO (MAIN)
    • Series 16/18
    • -1 : Not exist
      0 : BOC2
      1 : BSI+SLC
      2 : PMP2+SLC
      3 : BSI
      4 : PMP2

    • Series 21, 0i-A
    • -1 : Not exist
      0 : BOC2
      1 : BIT+SLC
      2 : PMP+SLC
      3 : BIT
      4 : PMP
    crtmin
    Type of CRTC module (MAIN)
    • Series 16/18
    • -1 : Not exist
      0 : 14"CRT
      1 : 9"CRT
      2 : VGA
      3 : HSSB-VGA
      4 : (reserve)
      5 : 9"VGA

    • Series 21
    • 0 : 14"VGA
      1 : 14"CRT
      2 : 7.2"VGA
      3 : 9"CRT

    • Series 0i-A
    • Not used.
    sv1min
    Existence of servo module (axis 1,2) (MAIN)
    • Series 16/18
    • -1 : Not exist
      0 : Exists

    • Series 21, 0i-A
    • Not used.
    sv3min
    • Series 16/18
    • Existence of servo module (axis 3,4) (MAIN)
      -1 : Not exist
      0 : Exists

    • Series 21, 0i-A
    • Existence of servo module (axis 1+2,3+4) (MAIN)
      0 : both axis 1+2 and 3+4
      1 : only axis 1+2
    sicmin
    • Series 16/18
    • Existence of SIC (MAIN)
      -1 : Not exist
      0 : Exists

    • Series 21
    • Existence of high-speed skip & analog I/O(MAIN)
      -1 : Not exist
      0 : Exists

    • Series 0i-A
    • Existence of high-speed skip LSI (MAIN)
      -1 : Not exist
      0 : Exists
    posmin
    • Series 16/18
    • Existence of position LSI (MAIN)
      -1 : Not exist
      0 : Exists

    • Series 21, 0i-A
    • Existence of graphic module (MAIN)
      -1 : Not exist
      0 : Exists
    drmmrc
    Extended DRAM for management software (PMC-SC)
    -1 : Not exist
    0 : Exists

    drmarc
    Capacity of DRAM for applications (PMC-SC)
    -1 : Not exist
    0 : 2(MB)
    1 : (reserve)
    2 : 512(KB)
    3 : 1(MB)

    pmcmrc
    Type of PMC module (PMC-SC)
    -1 : Not exist
    0 : 2(MB)
    1 : (reserve)
    2 : 512(KB)
    3 : 1(MB)

    dmaarc
    Existence of additional board for DMA (PMC-SC)
    -1 : Not exist
    0 : Exists

    iopt
    Number of DI/DO points (I/O card)
    • Series 16/18
    • -1 : Not exist
      0 : 144/112
      1 : 40/ 40
      2 : 80/ 56
      3 : 104/ 72
      4 : 156/120

    • Series 21T
    • -1 : Not exist
      0 : 96/ 64
      1 : (reserve)
      2 : 48/ 32

    • Series 21M
    • -1 : Not exist

    • Series 0i-A
    • Not used.
    hdiio
    Existence of LSI for high-speed skip (I/O card)
    -1 : Not exist
    0 : Exists

    frmsub
    Capacity of FROM module (SUB)
    -1 : Not exist
    0 : (reserve)
    1 : 2 (MB)
    2 : 4 (MB)
    3 : 6 (MB)
    4 : 8 (MB)
    5 : 10 (MB)
    6 : 12 (MB)
    7 : 4 (MB)
    8 : 3 (MB)
    9 : 2 (MB)
    10 : 6 (MB)
    11 : 8 (MB)
    12 : 10 (MB)
    13 : 12 (MB)
    14 : 14 (MB)
    15 : 1 (MB)
    16 : 1 (MB)
    17 : (reserve)
    18 : 4 (MB)
    19 : 8 (MB)

    drmsub
    Capacity of DRAM module (SUB)
    -1 : Not exist
    0 : 1 (MB)
    1 : 512 (KB)
    2 : 2 (MB)
    3 : (reserve)
    4 : (reserve)
    5 : 768 (KB)
    6 : (reserve)
    7 : 2.25(MB)
    8 : (reserve)
    9 : 256 (KB)

    srmsub
    Capacity of additional SRAM module (SUB)
    -1 : Not exist
    0 : 1 (MB)
    1 : 512 (KB)
    2 : 2 (MB)
    3 : (reserve)
    4 : (reserve)
    5 : 768 (KB)
    6 : (reserve)
    7 : 2.25(MB)
    8 : (reserve)
    9 : 256 (KB)

    sv5sub
    Existence of servo module (axis 5,6) (SUB)
    -1 : Not exist
    0 : Exists

    sv7sub
    Existence of servo module (axis 7,8) (SUB)
    -1 : Not exist
    0 : Exists

    sicsub
    Existence of SIC (SUB)
    -1 : Not exist
    0 : Exists

    possub
    Existence of position LSI (SUB)
    -1 : Not exist
    0 : Exists

    hamsub
    Existence of high-speed skip & analog I/O (SUB)
    -1 : Not exist
    0 : Both exist
    1 : only high-speed skip
    2 : only analog I/O

    gm2gr1
    Existence of graphic engine 2
    -1 : Not exist
    0 : Exists

    crtgr2
    Existence of CRTC module type (OPT-1)
    -1 : Not exist
    0 : 14" CRT
    1 : 9" CRT
    2 : VGA MAIN
    3 : (reserve)
    4 : 14" CRT GRPH
    5 : 9" CRT GRPH
    6 : VGA GRPH

    gm1gr2
    Existence of graphic module 1 (OPT-1)
    -1 : Not exist
    0 : Exists

    gm2gr2
    Existence of graphic module 2 (OPT-1)
    -1 : Not exist
    0 : Exists

    cmmrb
    Existence of communication module (OPT-1)
    -1 : Not exist
    0 : Exists

    sv5axs
    Existence of servo module (axis 5,6) (Axis card)
    -1 : Not exist
    0 : Exists

    sv7axs
    Existence of servo module (axis 7,8) (Axis card)
    -1 : Not exist
    0 : Exists

    sicaxs
    Existence of SIC (Axis card)
    -1 : Not exist
    0 : Exists

    posaxs
    Existence of a position LSI (Axis card)
    -1 : Not exist
    0 : Exists

    hanaxs
    Existence of high-speed skip & analog I/O
    -1 : Not exist
    0 : Both exist
    1 : only high-speed skip
    2 : only analog I/O

    romr64
    Capacity of system EPROM (64bitRISC)
    -1 : Not exist
    0 : 4 (MB)
    1 : 2 (MB)
    2 : 1 (MB)
    3 : 512 (KB)
    4 : 256 (KB)
    5 : 128 (KB)
    6 : 768 (KB)

    srmr64
    Capacity of SRAM module (64bitRISC)
    -1 : Not exist
    0 : 4 (MB)
    1 : 2 (MB)
    2 : 1 (MB)
    3 : 512 (KB)
    4 : 256 (KB)
    5 : 128 (KB)
    6 : 768 (KB)

    dr1r64
    Capacity of DRAM module 1 (64bitRISC)
    -1 : Not exist
    0 : (reserve)
    1 : (reserve)
    2 : 2 (MB)
    3 : 4 (MB)

    dr2r64
    Capacity of DRAM module 2 (64bitRISC)
    -1 : Not exist
    0 : (reserve)
    1 : (reserve)
    2 : 2 (MB)
    3 : 4 (MB)

    iopio2
    Number of DI/DO points (I/O card #2)
    -1 : Not exist
    0 : 144/112
    1 : 40/ 40
    2 : 80/ 56
    3 : 104/ 72
    4 : 156/120

    hdiio2
    Existence of LSI for high-speed skip
    -1 : Not exist
    0 : Exists

    cmmrb2
    Existence of communication module (OPT-1 #2)
    -1 : Not exist
    0 : Exists

    romfap
    Capacity of EPROM module (CAP2)
    -1 : Not exist
    0 : (reserve)
    1 : (reserve)
    2 : 1 (MB)
    3 : 512 (KB)
    4 : 256 (KB)
    5 : 128 (KB)
    6 : 768 (KB)

    srmfap
    Capacity of DRAM module (CAP2)
    -1 : Not exist
    0 : (reserve)
    1 : (reserve)
    2 : 1 (MB)
    3 : 512 (KB)
    4 : 256 (KB)
    5 : 128 (KB)
    6 : 768 (KB)

    drmfap
    Capacity of DRAM module (CAP2)
    -1 : Not exist
    0 : 2 (MB)
    1 : 1.5(MB)
    2 : 1 (MB)
    3 : 512 (KB)
    4 : 256 (KB)
    5 : 128 (KB)
    6 : (reserve)


    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_sysinfo

    Reads system information such as kind of CNC system, Machining(M) or Turning(T), series and version of CNC system software and number of the controlled axes.

    Use this function to confirm compatibility of CNC's system software and PMC's software or to get the number of controllable axes before reading axis coordinate data such as absolute, machine position.

    Note) that a null character ('\0') is not added at the end of each strings.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sysinfo(unsigned short FlibHndl, ODBSYS *sysinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sysinfo out

    Pointer to the ODBSYS structure including CNC system information.
    There is difference at the structure between Series 15 and Series 15i/16/18/21/16i/18i/21i/0i/30i/31i/32i/35i/Power Mate i, PMi-A.

    The ODBSYS structure define type for Series 15 is as follows.

                            
  • Series 15
  • typedef struct odbsys { short dummy ; /* dummy */ char max_axis[2] ;/* Max. controlled axes */ char cnc_type[2] ;/* Kind of CNC (ASCII) */ char mt_type[2] ; /* Kind of M/T/TT (ASCII) */ char series[4] ; /* Series number (ASCII) */ char version[4] ; /* Version number (ASCII) */ char axes[2] ; /* Current controlled axes(ASCII)*/ } ODBSYS ;
    The ODBSYS structure define type for Series 15i/16/18/21/16i/18i/21i/0i/30i/31i/32i/35i/Power Mate i, PMi-A is as follows.
                            
  • Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i/31i/32i, Power Mate i, PMi-A
  • typedef struct odbsys { short addinfo ; /* Additional information */ short max_axis ; /* Max. controlled axes */ char cnc_type[2] ;/* Kind of CNC (ASCII) */ char mt_type[2] ; /* Kind of M/T/TT (ASCII) */ char series[4] ; /* Series number (ASCII) */ char version[4] ; /* Version number (ASCII) */ char axes[2] ; /* Current controlled axes(ASCII)*/ } ODBSYS ;
    dummy
    Not used
    addinfo
    Additional information
    This is available at Series 15i/16/18/21, 16i/18i/21i/0i, 30i/31i/32i/35i, Power Mate i, PMi-A.
    bit 0
    0 : without loader control function
    1 : with loader control function
    bit 1
    0 : not an i Series CNC
    1 : i Series CNC
    bit 2
    reserved
    bit 3
    0 : without compound machining function
    1 : with compound machining function
    bit 4
    0 : without transfer line function
    1 : with transfer line function
    bit 5
    0 : not Plus type
    1 : Plus type
    Bit6,..,Bit7
    reserved
    Bit8〜15
    MODEL information
    0 : MODEL information is not supported
    1 : MODEL A
    2 : MODEL B
    3 : MODEL C
    4 : MODEL D
    6 : MODEL F
    In Series 15i, 16/18/21, 16i/18i/21i, 0i-A/B/C, 30i-A, Power Matei, MODEL information is not supported.
    max_axis
    Maximum controlled axes
    This is the maximum controlled axes in CNC.
      • Series 15
      • both max_axis[0] and max_axis[1] are NULL('\0') : 10 axes
        in other case : value itself(ASCII: ex.'15')
      • Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      • value itself(BINARY)
    cnc_type
    Kind of CNC (ASCII)
    '15' : Series 15/15i
    '16' : Series 16/16i
    '18' : Series 18/18i
    '21' : Series 21/21i
    '30' : Series 30i
    '31' : Series 31i
    '32' : Series 32i
    '35' : Series 35i
    ' 0' : Series 0i
    'PD' : Power Mate i-D
    'PH' : Power Mate i-H
    'PM' : Power Motion i
    mt_type
    Kind of M/T (ASCII)
    ' M' : Machining center
    ' T' : Lathe
    'MM' : M series with 2 path control
    'TT' : T series with 2/3 path control
    'MT' : T series with compound machining function
    ' P' : Punch press
    ' L' : Laser
    ' W' : Wire cut
    series
    Series number of CNC (ASCII)
    The character string of 4 digits is stored.
    version
    Version number of CNC(ASCII)
    The character string of 4 digits is stored.
    axes
    Current controlled axes(ASCII)
    The character string of 2 digits is stored.
    In case of 4 axes, ' 4' is set.

    For example, the following information are gotten by execution of this function on Series 16i-M (B0F1-0001) system with 3 servo axes and without loader control.

    sysinfo.addinfo  = 2
    sysinfo.max_axis = 8
    sysinfo.cnc_type = "16"
    sysinfo.mt_type  = " M"
    sysinfo.series   = "B0F1"
    sysinfo.version  = "0001"
    sysinfo.axes     = " 3"
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sysinfo out

    Pointer to the ODBSYS structure including CNC system information.

    typedef struct odbsys {
            short   addinfo ;    /* Additional information */
            short   max_axis ;   /* Max. controlled axes */
            char    cnc_type[2] ;/* Kind of CNC (ASCII) */
            char    mt_type[2] ; /* Kind of M/T/TT (ASCII) */
            char    series[4] ;  /* Series number (ASCII) */
            char    version[4] ; /* Version number (ASCII) */
            char    axes[2] ;   /* Current controlled axes(ASCII)*/
    } ODBSYS ;
    
    dummy
    Not used
    addinfo
    Additional information
    bit 0
    0 : without loader control function
    1 : with loader control function
    bit 1
    0 : not an i Series CNC
    1 : i Series CNC
    bit 2
    reserved
    bit 3
    0 : without compound machining function
    1 : with compound machining function
    Bit4,..,Bit15
    reserved
    max_axis
    Maximum controlled axes
    This is the maximum controlled axes in CNC.
        value itself(BINARY)
    cnc_type
    Kind of CNC (ASCII)
    '30' : Series 30i
    '31' : Series 31i
    '32' : Series 32i
    mt_type
    Kind of M/T (ASCII)
    ' M' : Machining center
    ' T' : Lathe
    'MM' : M series with 2 path control
    'TT' : T series with 2/3 path control
    'MT' : T series with compound machining function
    series
    Series number of CNC (ASCII)
    The character string of 4 digits is stored.
    version
    Version number of CNC(ASCII)
    The character string of 4 digits is stored.
    axes
    Current controlled axes(ASCII)
    The character string of 2 digits is stored.
    In case of 4 axes, ' 4' is set.

    For example, the following information are gotten by execution of this function on Series 30is-M (G001-0001) system with 3 servo axes.

    sysinfo.addinfo  = 2
    sysinfo.max_axis = 32
    sysinfo.cnc_type = "30"
    sysinfo.mt_type  = " M"
    sysinfo.series   = "G001"
    sysinfo.version  = "0001"
    sysinfo.axes     = " 3"
    

    ERRORS

    Code Description

    misc\cnc_sysinfo_ex

    Reads system information such as distinction of Machining(M) or Turning(T), number of path and number of the controlled axes.

    Use this function to confirm compatibility of CNC's system software and PMC's software or to get the number of controllable axes before reading axis coordinate data such as absolute, machine position.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_sysinfo_ex(unsigned short FlibHndl, ODBSYSEX *sys);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sys out

    Pointer to the ODBSYSEX structure including CNC system information.

    The ODBSYSEX structure is as follows.

    typedef struct odbsysex {
        short max_axis;       /* maximum controlled axes        */
        short max_spdl;       /* maximum spundle number         */
        short max_path;       /* maximum path number            */
        short max_mchn;       /* maximum machining group number */
        short ctrl_axis;      /* controlled axes number         */
        short ctrl_srvo;      /* servo axis number              */
        short ctrl_spdl;      /* spindle number                 */
        short ctrl_path;      /* path number                    */
        short ctrl_mchn;      /* number of control machines     */
        short reserved[3];
    
        struct {
            short system;     /* kind of system             */
            short group;      /* kind of system group       */
            short attrib;     /* path attribute             */
            short ctrl_axis;  /* control axes per path      */
            short ctrl_srvo;  /* servo axis number per path */
            short ctrl_spdl;  /* spindle number per path    */
            short mchn_no;    /* machine group number       */
            short reserved;
        } path[MAX_PATH];
    } ODBSYSEX;
    
    max_axis
    Maximum controlled axes number per all CNC system.
    max_spdl
    Maximum spindle number per all CNC system.
    max_path
    Maximum path number per all CNC system.
    max_mchn
    Maximum machining group number per all CNC system.

    ctrl_axis
    Controlled axes number per all CNC system.
    ctrl_srvo
    Servo axis number per all CNC system.
    * This data is same as ctrl_axis.
    ctrl_spdl
    Spindle number per all CNC system.
    ctrl_path
    Path number.
    ctrl_mchn
    Machine group number.
    path
    Information in each system is stored in the array of number of max_path.
    system
    Kind of system
    0x0000 : None
    0x204D : (= ' M') Machining
    0x2054 : (= ' T') Turning
    0x2057 : (= ' W') Wirecut
    group
    Kind of system group
    0 : None
    1 : Group of machining
    2 : Group of turning
    attrib
    Path attribute
    0 : CNC
    1 : Loader
    ctrl_axis
    Control axes per path
    ctrl_srvo
    Servo axis number per path
    * This data is same as ctrl_axis.
    ctrl_spdl
    Spindle number per path
    mchn_no
    Machine group number

    ERRORS

    Code Description

    misc\cnc_wrcexesram

    Writes the SRAM variable area for C language executor specified by "offset", "length".

    When this function accesses this area, exclusive control with the C language executor side is not done. Therefore, it is necessary to take mediation between the application of FOCAS1/2 and the application of C language executor.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrcexesram(unsigned short FlibHndl, long offset, void *data, long *length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    offset in

    Specify the start address of SRAM variable area. The top of the area is indicated by '0'.

    data in

    Pointer to the data storage area.

    length in/out Pointer to the data length to be write.
    Actual data length being write is stored after this function call.
    Maximum data length which can be write at a time is the size acquired in the cnc_cexesramsize function.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    The user application is not built into CNC.
    The C language executor library does not support this function.
    EW_LENGTH The specification of length is wrong.
    The value of 0 or less was specified.
    EW_NUMBER The specification of offset is wrong.
    A negative value was specified.
    The value which exceeded the maximum value was specified.
    EW_NOOPT No option
    The C language executor function and the extended driver/library function are necessary.

    misc\cnc_wrmenuswitch

    Writes the menu switch signals.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmenuswitch(unsigned short FlibHndl, short slct_data, short menu);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slct_data in

    Specify the signal selection flag.

    bit 0 : machine lock signal
    bit 1 : display lock signal
    bit 2 : single block signal
    bit 3 : dry run signal
    bit 4 : auxiliary function lock signal
    bit 5 : manual absolute signal
    bit 6 : Z axis neglect signal
    bit 7 : block delete signal 1
    bit 8 : block delete signal 2
    bit 9 : block delete signal 3
    bit 10 : block delete signal 4
    bit 11 : block delete signal 5
    bit 12 : block delete signal 6
    bit 13 : block delete signal 7
    bit 14 : block delete signal 8
    bit 15 : block delete signal 9

    * If the bit for each signal is 0, its signal is not written. In order to write the signal to CNC, turn on the corresponding bit on this data.

    menu in

    The menu switch signals must be set. The following bit for each signal must be set to 0 or 1. The details are as follows.

    bit 0 : machine lock signal
    bit 1 : display lock signal
    bit 2 : single block signal
    bit 3 : dry run signal
    bit 4 : auxiliary function lock signal
    bit 5 : manual absolute signal
    bit 6 : Z axis neglect signal
    bit 7 : block delete signal 1
    bit 8 : block delete signal 2
    bit 9 : block delete signal 3
    bit 10 : block delete signal 4
    bit 11 : block delete signal 5
    bit 12 : block delete signal 6
    bit 13 : block delete signal 7
    bit 14 : block delete signal 8
    bit 15 : block delete signal 9

    If CNC does not have the additional optional block skip function, bit 8 through bit 15 can not be written.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at 15TT.
    EW_NOOPT No option
    The menu switch option and the extended driver/library function are necessary.

    misc\cnc_wropnlgnrl

    Writes the general output signal of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wropnlgnrl(unsigned short FlibHndl, IODBGNRL *opnlgnrl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    opnlgnrl in

    Pointer to the IODBGNRL structure to set the general output signal of software operator's panel.

    The IODBGNRL structure is as follows.
    typedef struct iodbgnrl {
         short     datano;      /* Not used */
         short     type;        /* Data select flag */
         char      sgnal;       /* General-purpose signal 1 to 8 */
    } IODBGNRL ;
    
    datano
    Not used.
    type
    Specify the data select flag.
    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8
    • * Bit 8 to 15 is not used.
    • * When the bit corresponding to the signal is set to 0, that signal is not written. To write the signal, set the corresponding bit to 1.
    sgnal
    Specify the General-purpose signal.
    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8

    ERRORS

    Code Description
    EW_NOOPT No option
    The software operator's panel general SW function and the extended driver/library function are necessary.

    misc\cnc_wropnlgsname

    Writes the general signal name of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wropnlgsname(unsigned short FlibHndl, IODBRDNA *brdna);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    brdna in

    Pointer to the IODBRDNA structure to set the general signal name of software operator's panel.

    The IODBRDNA structure is as follows.
    typedef struct iodbrdna {
         short  datano;         /* Not used */
         short  type;           /* Data select flag */
         char   sgnl1_name[9];  /* General signal name 1 (ASCII) */
         char   sgnl2_name[9];  /* General signal name 2 (ASCII) */
         char   sgnl3_name[9];  /* General signal name 3 (ASCII) */
         char   sgnl4_name[9];  /* General signal name 4 (ASCII) */
         char   sgnl5_name[9];  /* General signal name 5 (ASCII) */
         char   sgnl6_name[9];  /* General signal name 6 (ASCII) */
         char   sgnl7_name[9];  /* General signal name 7 (ASCII) */
         char   sgnl8_name[9];  /* General signal name 8 (ASCII) */
    } IODBRDNA ;
    
    datano
    Not used.
    type
    Specify the selection flag.
    bit 0 : General-purpose signal 1
    bit 1 : General-purpose signal 2
    bit 2 : General-purpose signal 3
    bit 3 : General-purpose signal 4
    bit 4 : General-purpose signal 5
    bit 5 : General-purpose signal 6
    bit 6 : General-purpose signal 7
    bit 7 : General-purpose signal 8
    • * Bit 8 to 15 is not used.
    • * When the bit corresponding to the signal is set to 0, that signal is not written. To write the signal, set the corresponding bit to 1.
    sgnl1_name
    Specify the general signal name 1 (ASCII).
    sgnl2_name
    Specify the general signal name 2 (ASCII).
    sgnl3_name
    Specify the general signal name 3 (ASCII).
    sgnl4_name
    Specify the general signal name 4 (ASCII).
    sgnl5_name
    Specify the general signal name 5 (ASCII).
    sgnl6_name
    Specify the general signal name 6 (ASCII).
    sgnl7_name
    Specify the general signal name 7 (ASCII).
    sgnl8_name
    Specify the general signal name 8 (ASCII).

    Eight characters from the top of each name (sgnl?_name[0] - sgnl?_name[7]) is set by CNC.

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.

    misc\cnc_wropnlsgnl

    Writes the output signal of software operator's panel.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wropnlsgnl(unsigned short FlibHndl, IODBSGNL *sgnl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sgnl in

    Pointer to the IODBSGNL structure to set the output signal of software operator's panel.

    The IODBSGNL structure is as follows.
                               
  • Series 15/15i
  • typedef struct iodbsgnl { short datano; /* (Not used) */ short type; /* Data select flag */ short mode; /* Mode signal */ short hndl_ax; /* Manual handle feed axis selection signal */ short hndl_mv; /* Manual handle feed travel distance selection signal */ short rpd_ovrd; /* Rapid traverse override signal */ short jog_ovrd; /* Manual feedrate override signal*/ short feed_ovrd; /* Feedrate override signal */ short spdl_ovrd; /* Spindle override signal (only Series 15i) */ short blck_del; /* Optional block skip signal(0/1)*/ short sngl_blck; /* Single block signal(0/1) */ short machn_lock; /* Machine lock signal(0/1) */ short dry_run; /* Dry run signal(0/1) */ short mem_prtct; /* Memory protection signal(0/1) */ short feed_hold; /* Automatic operation halt signal(0/1) */ short manual_rpd; /* (Not used) */ short dummy[2]; /* (Not used) */ } IODBSGNL ;
                            
                               
  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  • typedef struct iodbsgnl { short datano; /* (Not used) */ short type; /* Data select flag */ short mode; /* Mode signal */ short hndl_ax; /* Manual handle feed axis selection signal */ short hndl_mv; /* Manual handle feed travel distance selection signal */ short rpd_ovrd; /* Rapid traverse override signal */ short jog_ovrd; /* Manual feedrate override signal*/ short feed_ovrd; /* Feedrate override signal */ short spdl_ovrd; /* (Not used) */ short blck_del; /* Optional block skip signal(0/1)*/ short sngl_blck; /* Single block signal(0/1) */ short machn_lock; /* Machine lock signal(0/1) */ short dry_run; /* Dry run signal(0/1) */ short mem_prtct; /* Memory protection signal(0/1) */ short feed_hold; /* Automatic operation halt signal(0/1) */ } IODBSGNL ;
    datano
    Not used
    type
    Specify the data selection flag.
    bit 0 : Mode signal
    bit 1 : Manual handle feed axis selection signal
    bit 2 : Manual handle feed travel distance selection signal
    bit 3 : Rapid traverse override signal
    bit 4 : Manual feedrate override signal
    bit 5 : Feedrate override signal
    bit 6 : Spindle override signal (only Series 15i)
    bit 6 : (Not used)
    bit 7 : Optional block skip signal
    bit 8 : Single block signal
    bit 9 : Machine lock signal
    bit 10 : Dry run signal
    bit 11 : Memory protection signal
    bit 12 : Automatic operation halt signal
    bit 13 : (Not used)
    bit 14 : (Not used)
    bit 15 : (Not used)

    * When the bit corresponding to the signal is set to 0, that signal is not written. To write the signal, set the corresponding bit to 1.

    mode
    Specify the mode signal.
  • Series 15/15i
  • 0 : MDI
    1 : MEM
    2 : EDIT
    3 : HND
    4 : JOG
    5 : REF
    6 : DNC
    7 : INC
  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
  • 0 : MDI
    1 : MEM
    2 : EDIT
    3 : HNDL or INC
    4 : JOG
    5 : REF
    hndl_ax
    Specify the manual handle feed axis selection signal.
    0 : HX
    1 : HY
    2 : HZ
    3 : H4
    hndl_mv
    Specify the manual handle feed travel distance selection signal.
    0 : ×1
    1 : ×10
    2 : ×100
    rpd_ovrd
    Specify the rapid traverse override signal.
    0 : 100%
    1 : 50%
    2 : 25%
    3 : F0
    jog_ovrd
    Specify the manual feedrate override signal.
    0 : 0% 10 : 2.0% 20 : 52.0%
    1 : 0.1% 11 : 2.7% 21 : 72.0%
    2 : 0.14% 12 : 3.7% 22 : 100%
    3 : 0.2% 13 : 5.2% 23 : 140%
    4 : 0.27% 14 : 7.2% 24 : 200%
    5 : 0.37% 15 : 10.0%
    6 : 0.52% 16 : 14.0%
    7 : 0.72% 17 : 20.0%
    8 : 1.0% 18 : 27.0%
    9 : 1.4% 19 : 37.0%
    feed_ovrd
    Specify the feedrate override signal.
    0 : 0% 10 : 100% 20 : 200%
    1 : 10% 11 : 110%
    2 : 20% 12 : 120%
    3 : 30% 13 : 130%
    4 : 40% 14 : 140%
    5 : 50% 15 : 150%
    6 : 60% 16 : 160%
    7 : 70% 17 : 170%
    8 : 80% 18 : 180%
    9 : 90% 19 : 190%
    spdl_ovrd
    Specify the spindle override signal. (only Series 15i)
    0 : 0% 10 : 100% 20 : 200%
    1 : 10% 11 : 110%
    2 : 20% 12 : 120%
    3 : 30% 13 : 130%
    4 : 40% 14 : 140%
    5 : 50% 15 : 150%
    6 : 60% 16 : 160%
    7 : 70% 17 : 170%
    8 : 80% 18 : 180%
    9 : 90% 19 : 190%
    Not used
    blck_del
    Specify the optional block skip signal (0/1).
    sngl_blck
    Specify the single block signal (0/1).
    machn_lock
    Specify the machine lock signal (0/1).
    dry_run
    Specify the dry run signal (0/1).
    mem_prtct
    Specify the memory protection signal (0/1).
    feed_hold
    Specify the automatic operation halt signal (0/1).
    manual_rpd
    Not used.

    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The item including incorrect data (the bit position in the data selection flag (type)) will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT No option
    The software operator's panel function and the extended driver/library function are necessary.

    misc\cnc_wrpm_item

    Writes all data specified by the item index.
    The acquired data is as follows.

    - Name
    - Life count type
    - Life time data
    - Life remained time data
    - Life count state


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpm_item(unsigned short FlibHndl, short start_num, short type, short data_num, IODBPMAINTE* item);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_num in Specify the starting item index to be written. (1..10)
    type in

    Specify the written data type.

    0 : Clear all information
    1 : Name string
    2 : Life count type
    3 : Life time data
    4 : Life remained time data
    5 : Life count state
    -1 : All above data
    data_num in Specify the number of items to be written.
    item in

    Specify the pointer to the array of IODBPMAINTE structure.
    The array of the structure specified by data_num is required.

    The IODBPMAINTE structure is as follows.
    typedef struct tagIODBPMAINTE {
        char  name[40];     /* Name string */
        long  type;         /* Life count type */
        long  total;        /* Life time (unit:minute) */
        long  remain;       /* Life remained time */
        long  stat;         /* Life count state */
    } IODBPMAINTE;
    
    name
    Specify Name string
    Please refer to cnc_wrpm_mcnitem for the method of specifying the name.
    type
    Specify Life count type
    0 : Invalidity
    1 : All time
    2 : Power on
    3 : Running
    4 : Cutting
    total
    Specify Life time
    In case of 16i/18i/21i, unit is "hour".
    In case of 30i/31i/32i, 0i-D and PMi-A, unit is "minute".
    unit is "hour".
    remain
    Specify Life remained time
    In case of 16i/18i/21i, unit is "hour".
    In case of 30i/31i/32i, 0i-D and PMi-A, unit is "minute".
    unit is "hour".
    stat
    Specify Life count state
    16i/18i/21i is unused.

    ERRORS

    Code Description
    EW_FUNC "Name" or "Life time data" is not set.
    Program is running. (only 16i18i/21i)
    EW_LENGTH data block length error
    The number of items to be written(data_num) is 0.
    EW_NUMBER data number error
    The starting item index to be written (start_num) is invalid.
    EW_ATTRIB data attribute error
    The written data type(type) is invalid.
    EW_DATA data error
    In order to get more information for this return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Name string error
    2 : Life count type error
    3 : Life time data error
    4 : Life remained time data error
    5 : Life count state error
    Item index corresponding error data is acquired at err_dtno.
    EW_REJECT CNC execution rejected
    CNC is on execution.

    misc\cnc_wrpm_mcnitem

    Writes the item name relating the machine specified by the item index.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpm_mcnitem(unsigned short FlibHndl, short start_num, short data_num, char (*name)[62]);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_num in Specify the starting item index to be written. (1..10)
    data_num in Specify the number of items to be written.
    name[62] in Specify the pointer of the array of name strings (each 62 characters).
    The array of this string that is specified by data_num is required.
    The number of characters which can be set is up to 24 characters. Please set "NULL" character for the terminal of string.

    ERRORS

    Code Description
    EW_LENGTH data block length error
    The number of items to be written(data_num) is 0.
    EW_NUMBER data number error
    The starting item index to be written (start_num) is invalid.
    EW_DATA data error
    In order to get more information for this return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Name of item relating machine error
    Item index corresponding error data is acquired at err_dtno.
    EW_REJECT CNC execution rejected
    CNC is on execution.

    misc\cnc_wrtimer

    Sets cutting time, cycle time, and other timer data of CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtimer(unsigned short FlibHndl, short type, IODBTIME *time);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify timer data to be set.

    1 : Operating time
    2 : Cutting time
    3 : Cycle time
    4 : Free purpose
    time in

    Pointer to the IODBTIME structure including timer data of CNC.

    The IODBTIME structure is as follows.
    typedef struct iodbtime {
            long    minute ;    /* minutes (0 - 999999999) */
            long    msec ;      /* milliseconds (0 - 59999) */
    } IODBTIME ;
    

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of timer data (type) is wrong.
    EW_DATA Data error
    Some value of member in the IODBTIME structure is wrong.

    motor\cnc_loadtorq

    Reads abnormal load torque data (estimated load torque) of servo motors or spindle motors. Data is stored in ODBLOAD structure in signed binary form.
    motor specifies the type of a target motor for reading.
    Reads the abnormal load torque data for all axes once by specifying 'ALL_AXES' in 'axis'.
    The abnormal load torque data for each axis is stored in data array of "ODBLOAD" structure.

    (1) For servo motors
    In torq.data, a digitized value of a load current ("0" to "+/-7282") is stored in binary form. From this value, the load current value can be obtained by using the following formula:
    Load current = torq.data × N / 7282 [Apeak]
    where, N denotes the following:
    Value of parameter No. 2165 N value
    Smaller than 20 Value of parameter No. 2165
    20 or greater Value of parameter No. 2165/10 * 10
    (The figure of the unit's place is omitted.)

    (2) For spindle motors
    A value from "-32767" to "+32767" is stored. From this value, the percentage to the maximum torque can be obtained by using the following formula:
    Percentage to the maximum torque = buf.data/32767×100 [%]


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_loadtorq( unsigned short FlibHndl, short motor, short axis, short longth, ODBLOAD *torq );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    motor in

    Motor type.

    0 Servo motor
    1 Spindle motor
    axis in

    Axis number.

    ALL_AXES Specifies all axes (ALL_AXES).
    1-m Specifies one axis (m: current number of controlled axes).
    length in

    Data block length.
    (= 4 + 2×(number of axes to be read))

    torq out

    Buffer in which abnormal load torque data is stored. The ODBLOAD structure is as follows.

    typedef struct odbload {
        short   datano ;        /* Motor type. */
        short   type ;          /* Axis number. */
        short   data[N] ;       /* Abnormal load torque data. */
    } ODBLOAD ;                 /* N is the maximum number of controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH The specified data block length is invalid.
    The ODBLOAD size(length) is invalid.
    EW_ATTRIB The specified axis number is invalid.
    The axis number(axis) is invalid.
    EW_NOOPT No option.
    The unexpected disturbance torque detection function and the extended driver/library function are necessary.

    motor\cnc_rdctrldi

    Reads "control input signal for spindle monitor".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdctrldi(unsigned short FlibHndl,ODBSPDI *spdi);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdi out

    Pointer to the ODBSPDI structure array including the control input signal for spindle monitor. The number of array must be equal to the following.

    Series 15 2
    Series 16/18/21 3
    Series 15i, 16i/18i/21i, 0i-A/B/C 4
    Series 30i, 0i-D/F 8
    Power Mate i 1

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        ODBSPDI spdi[N] ; /* N : maximum spindle number */
    

    The ODBSPDI structure is as follows.

    typedef struct odbspdi {
        char    sgnl1 ;         /* control input signal 1 */
        char    sgnl2 ;         /* control input signal 2 */
        char    sgnl3 ;         /* control input signal 3 */
        char    sgnl4 ;         /* control input signal 4 */
    } ODBSPDI ;
    
    sgnl1
    control input signal 1
    TLML : TORQUE LIMIT LOW SRV : REVERSE ROTATION
    TLMH : TORQUE LIMIT HIGH SFR : OBVERSE ROTATION
    CTH2 : CLUTCH/GEAR RATIO ORCM : ORIENTATION
    CTH1 : CLUTCH/GEAR RATIO MRDY : MACHINE READY
    sgnl2
    control input signal 2
    ARST : ALARM RESET SIGNAL SOCN : SOFT START STOP CANCEL
    *ESP : EMERGENCY STOP INTG : SPEED INTEGRATION CONTROL SIGNAL
    SPSL : SPINDLE SELECT RSL : OUTPUT SWITCH DEMAND SIGNAL
    MCFN : POWER LINE SWITCH SIGNAL RCH : POWER LINE STAT SIGNAL
    sgnl3
    control input signal 3
    INDX : ORIENTATION STOP POSITION CHANGE
    ROTA : ORIENTATION STOP POSITION CHANGE-ROTATION DIRECTION
    NRRO : ORIENTATION STOP POSITION CHANGE-NEAR ROTATE
    DEFM : DIFFERENCE VELOCITY MODE
    sgnl4
    control input signal 4
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdi out

    Pointer to the ODBSPDI structure array including the control input signal for spindle monitor. The number of array must be 8.

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        ODBSPDI spdi[N] ; /* N : maximum spindle number */
    

    The ODBSPDI structure is as follows.

    typedef struct odbspdi {
        char    sgnl1 ;         /* control input signal 1 */
        char    sgnl2 ;         /* control input signal 2 */
        char    sgnl3 ;         /* control input signal 3 */
        char    sgnl4 ;         /* control input signal 4 */
    } ODBSPDI ;
    
    sgnl1
    control input signal 1
    TLML : TORQUE LIMIT LOW SRV : REVERSE ROTATION
    TLMH : TORQUE LIMIT HIGH SFR : OBVERSE ROTATION
    CTH2 : CLUTCH/GEAR RATIO ORCM : ORIENTATION
    CTH1 : CLUTCH/GEAR RATIO MRDY : MACHINE READY
    sgnl2
    control input signal 2
    ARST : ALARM RESET SIGNAL SOCN : SOFT START STOP CANCEL
    *ESP : EMERGENCY STOP INTG : SPEED INTEGRATION CONTROL SIGNAL
    SPSL : SPINDLE SELECT RSL : OUTPUT SWITCH DEMAND SIGNAL
    MCFN : POWER LINE SWITCH SIGNAL RCH : POWER LINE STAT SIGNAL
    sgnl3
    control input signal 3
    INDX : ORIENTATION STOP POSITION CHANGE
    ROTA : ORIENTATION STOP POSITION CHANGE-ROTATION DIRECTION
    NRRO : ORIENTATION STOP POSITION CHANGE-NEAR ROTATE
    DEFM : DIFFERENCE VELOCITY MODE
    sgnl4
    control input signal 4

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function(only Series 15 , 15i) and the extended driver/library function are necessary.

    motor\cnc_rdctrldo

    Reads "control output signal for spindle monitor".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdctrldo(unsigned short FlibHndl,ODBSPDO *spdo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdo out

    Pointer to the ODBSPDO structure array including the control output signal for spindle monitor. The number of array must be equal to the following.

    Series 15 2
    Series 16/18/21 3
    Series 15i, 16i/18i/21i, 0i-A/B/C 4
    Series 30i, 0i-D/F 8
    Power Mate i 1

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        ODBSPDO spdo[N] ; /* N : maximum spindle number */
    

    The ODBSPDO structure is as follows.

    typedef struct odbspdo {
        char    sgnl1 ;         /* control output signal 1 */
        char    sgnl2 ;         /* control output signal 2 */
        char    sgnl3 ;         /* control output signal 3 */
        char    sgnl4 ;         /* control output signal 4 */
    } ODBSPDO ;
    
    sgnl1
    control output signal 1
    ALM : ALARM SIGNAL LDT1 : LOAD DETECT SIGNAL1
    SST : SPEED ZERO SIGNAL LDT2 : LOAD DETECT SIGNAL2
    SDT : SPEED DETECT SIGNAL TLM5 : TORQUE LIMITING SIGNAL
    SAR : SPEED ARRIVE SIGNAL ORAR : ORIENTATION FINISH SIGNAL
    sgnl2
    control output signal 2
    CHP : POWER LINE SWITCH SIGNAL
    CFIN : SPINDLE CHANGE FINISH SIGNAL
    RCHP : OUTPUT CHANGE SIGNAL
    RCFN : OUTPUT CHANGE FINISH SIGNAL
    sgnl3
    control output signal 3
    sgnl4
    control output signal 4
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdo out

    Pointer to the ODBSPDO structure array including the control output signal for spindle monitor. The number of array must be 8.

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        ODBSPDO spdo[N] ; /* N : maximum spindle number */
    

    The ODBSPDO structure is as follows.

    typedef struct odbspdo {
        char    sgnl1 ;         /* control output signal 1 */
        char    sgnl2 ;         /* control output signal 2 */
        char    sgnl3 ;         /* control output signal 3 */
        char    sgnl4 ;         /* control output signal 4 */
    } ODBSPDO ;
    
    sgnl1
    control output signal 1
    ALM : ALARM SIGNAL LDT1 : LOAD DETECT SIGNAL1
    SST : SPEED ZERO SIGNAL LDT2 : LOAD DETECT SIGNAL2
    SDT : SPEED DETECT SIGNAL TLM5 : TORQUE LIMITING SIGNAL
    SAR : SPEED ARRIVE SIGNAL ORAR : ORIENTATION FINISH SIGNAL
    sgnl2
    control output signal 2
    CHP : POWER LINE SWITCH SIGNAL
    CFIN : SPINDLE CHANGE FINISH SIGNAL
    RCHP : OUTPUT CHANGE SIGNAL
    RCFN : OUTPUT CHANGE FINISH SIGNAL
    sgnl3
    control output signal 3
    sgnl4
    control output signal 4

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function(only Series 15/15i) and the extended driver/library function are necessary.

    motor\cnc_rdcurrent

    Reads "The servo adjustment real current".

    When the following parameter is '0', '0' is always returned.

    • Series 15/15i
    • 1979
    • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • 2086


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcurrent(unsigned short FlibHndl,short *crrnt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    crrnt out

    Specify the address of the array to store the real current for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.

          short   crrnt[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    motor\cnc_rdfromservoid2

    Read specified servo id information from FROM.

    Each information is stored in member of the ODBCSVID2 structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdfromservoid2(unsigned short FlibHndl, short axis, ODBCSVID2 *servoid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled axis number of reading servo ID information.

    servoid out

    Specify the pointer to a variable of ODBCSVID2 structure for setting servo ID information. The details of members of ODBCSVID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Servo motor specification */
        char   mt_srn[10] ;        /* Servo motor serial number */
        char   plc_spc[22] ;       /* Pulse coder specification */
        char   plc_srn[9] ;        /* Pulse coder serial number */
        char   svm_spc[22] ;       /* SV specification */
        char   svm_srn[12] ;       /* SV serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   svs_see[9] ;        /* SV software series edition */
        char   pss_see[9] ;        /* PS software series edition */
        char   pm1_spc[22] ;       /* Separator 1 specification */
        char   pm1_srn[9] ;        /* Separator 1 serial number */
        char   pm2_spc[22] ;       /* Separator 2 specification */
        char   pm2_srn[9] ;        /* Separator 2 serial number */
    } ODBCSVID2 ;
    

    ERRORS

    Code Description

    motor\cnc_rdfromspindleid2

    Read specified spindle id information from FROM.

    Each information is stored in member of the ODBCSPID2 structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdfromspindleid2(unsigned short FlibHndl, short sp, ODBCSPID2 *spindleid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled spindle number of reading spindle ID information.

    spindleid out

    Specify the pointer to a variable of ODBCSPID2 structure for setting spindle ID information. The details of members of ODBCSPID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Main SP motor specification */
        char   mt_srn[10] ;        /* Main SP motor serial number */
        char   sbmt_spc[20] ;      /* Sub SP motor specification */
        char   sbmt_srn[10] ;      /* Sub SP motor serial number */
        char   spm_spc[22] ;       /* SP specification */
        char   spm_srn[12] ;       /* SP serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   pss_see[9] ;        /* PS software series edition */
    } ODBCSPID2 ;
    

    ERRORS

    Code Description

    motor\cnc_rdloopgain

    Reads "The servo adjustment loop gain".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdloopgain(unsigned short FlibHndl,long *gain);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    gain out

    Specify the address of the array to store the loop gain for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.

          long    gain[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    motor\cnc_rdnspdl

    Reads the number of spindles which CNC can control. It is not the number of mounted spindles.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdnspdl(unsigned short FlibHndl,short *spdl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdl out

    Specify the address of the variable to store the number of spindles.

    Series 15, 21i, 0i 0,..,2
    Series 16/18 0,..,3
    Series 15i, 16i/18i 0,..,4
    Series 30i 0,..,8
    Series 21, Power Mate i 0,..,1
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdl out

    Specify the address of the variable to store the number of spindles.


    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function(only Series 15) and the extended driver/library function are necessary.

    motor\cnc_rdopmode

    Reads "The operation mode for spindle adjustment".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdopmode(unsigned short FlibHndl,short *mode);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode out

    Specify the address of the array to store the operation mode for spindle adjustment. The number of array must be equal to the following.

    Series 15 2
    Series 16/18/21 3
    Series 15i, 16i/18i/21i, 0i-A/B/C 4
    Series 30i, 0i-D/F 8
    Power Mate i 1

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        short   mode[N] ; /* N : maximum spindle number */
    

    The meaning of the operation mode for the spindle adjustment is as follows.

    0 : Others
    1 : Normal operation
    2 : Orientation
    3 : Synchronous control
    4 : Rigid tapping
    5 : Cs contouring control
    6 : Spindle positioning control(only Series 15i, Series 16T/18T/21T)

    * "Others" within above-mentioned mode shows the status which CNC does not control the spindle.
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode out

    Specify the address of the array to store the operation mode for spindle adjustment. The number of array must be 8.

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        short   mode[N] ; /* N : maximum spindle number */
    

    The meaning of the operation mode for the spindle adjustment is as follows.

    0 : Others
    1 : Normal operation
    2 : Orientation
    3 : Synchronous control
    4 : Rigid tapping
    5 : Cs contouring control

    * "Others" within above-mentioned mode shows the status which CNC does not control the spindle.

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdposerrs

    Reads "The position deflection S for spindle adjustment".

    The position deflection S is valid only when the operation mode is as follows.

    • Orientation
    • Rigid tapping
    • Cs contouring control
    • Spindle positioning control(only Series 15i, Series 16T/18T/21T/16iT/18iT/21iT)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdposerrs(unsigned short FlibHndl,long *poserr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    poserr out

    Specify the address of the array to store the position deflection S for spindle adjustment. The number of array must be equal to the following.

    Series 15 2
    Series 16/18/21 3
    Series 15i, 16i/18i/21i, 0i-A/B/C 4
    Series 30i, 0i-D/F 8
    Power Mate i 1

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

          short   poserr[N] ; /* N : maximum spindle number */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    poserr out

    Specify the address of the array to store the position deflection S for spindle adjustment. The number of array must be 8.

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

          short   poserr[N] ; /* N : maximum spindle number */
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdposerrs2

    Reads "The position deflection S1, S2 for spindle adjustment" in the synchronous control mode.

    The position deflection S1, S2 is valid only during the synchronous control mode.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdposerrs2(unsigned short FlibHndl,ODBPSER *pser);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pser out

    Pointer to the ODBPSER structure including the position deflection S1, S2 for spindle adjustment. The ODBPSER structure is as follows.

    typedef struct odbpser {
        long    poserr1 ;       /* position deflection S1 */
        long    poserr2 ;       /* position deflection S2 */
    } ODBPSER ;
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pser out

    Pointer to the ODBPSER structure including the position deflection S1, S2 for spindle adjustment. The ODBPSER structure is as follows.

    typedef struct odbpser {
        long    poserr1 ;       /* position deflection S1 */
        long    poserr2 ;       /* position deflection S2 */
    } ODBPSER ;
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdposerrz

    Reads "The position deflection Z for spindle adjustment" in the rigid tapping mode.

    The position deflection Z is valid only during the rigid tapping mode.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdposerrz(unsigned short FlibHndl,long *poserrz);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    poserrz out

    Specify the address of the variable to store the position deflection Z of tapping axis for spindle adjustment.


    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdservoid2

    Read specified servo id information from adaptation device.

    Each information is stored in member of the ODBCSVID2 structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdservoid2(unsigned short FlibHndl, short axis, short type, ODBCSVID2 *servoid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled axis number of reading servo ID information.

    type in

    Specify the type of reading data for servo ID information. The type which can be specified is as follows.

    0 Servo motor specification
    1 Servo motor serial number
    2 Pulse coder specification
    3 Pulse coder serial number
    4 SV specification
    5 SV serial number
    6 PS specification
    7 PS serial number
    8 SV software series edition
    9 PS software series edition
    10 Separator 1 specification
    11 Separator 1 serial number
    12 Separator 2 specification
    13 Separator 2 serial number
    -1 All of the above-mentioned data kind
    servoid out

    Specify the pointer to a variable of ODBCSVID2 structure for setting servo ID information. The details of members of ODBCSVID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Servo motor specification */
        char   mt_srn[10] ;        /* Servo motor serial number */
        char   plc_spc[22] ;       /* Pulse coder specification */
        char   plc_srn[9] ;        /* Pulse coder serial number */
        char   svm_spc[22] ;       /* SV specification */
        char   svm_srn[12] ;       /* SV serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   svs_see[9] ;        /* SV software series edition */
        char   pss_see[9] ;        /* PS software series edition */
        char   pm1_spc[22] ;       /* Separator 1 specification */
        char   pm1_srn[9] ;        /* Separator 1 serial number */
        char   pm2_spc[22] ;       /* Separator 2 specification */
        char   pm2_srn[9] ;        /* Separator 2 serial number */
    } ODBCSVID2 ;
    

    ERRORS

    Code Description

    motor\cnc_rdspdlalm

    Reads the alarm number corresponding to the message of "spindle alarm for spindle monitor".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspdlalm(unsigned short FlibHndl,char *alm_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alm_no out

    Specify the address of the array to store the alarm number for "spindle alarm for spindle monitor". The number of array must be equal to the following.

    Series 15 2
    Series 16/18/21 3
    Series 15i, 16i/18i/21i, 0i-A/B/C 4
    Series 30i, 0i-D/F 8
    Power Mate i 1

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        char    alarm_no[N] ; /* N : maximum spindle number */
    

    The messages for alarm number 1,..,38 are as follows. The alarm except the following doesn't have the message.

    01 : MOTOR OVERHEAT 25 : SERIAL TRANS.STOP
    02 : SPEED ERR.EXCESS 26 : CS-VEL.DISCONNECT
    03 : FUSE IN DC LINK 27 : POSITION CODER DISCONNECT
    04 : FUSE IN AC INPUT 28 : CS-POSITION DISCONNECT
    05 : FUSE ON P.C.B. 29 : OVERLOAD
    07 : OVER SPEED 30 : INPUT OVER CURRENT
    09 : HEATSINK OVERHEAT 31 : PG DISCONNECT
    10 : LOW VOLTAGE 32 : SERIAL RAM ERROR
    11 : DC LINK OVER VOLTAGE 33 : DC LINK LOW VOLTAGE
    12 : DC LINK OVER CURRENT 34 : PARAMETER SETTING ERROR
    13 : MEMORY ERROR 35 : GEAR RATIO SETTING ERROR
    18 : SUM CHECK ERROR 36 : ERR.COUNT.OVERFLOW
    19 : U PHASE OFFSET 37 : SPEED DETECTION
    20 : V PHASE OFFSET 38 : MG SENSOR SIGNAL
    24 : SERIAL DATA ERROR
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    alm_no out

    Specify the address of the array to store the alarm number for "spindle alarm for spindle monitor". The number of array must be 8.

    The data within the number of spindles acquired by cnc_rdnspdl function is valid.

        char    alarm_no[N] ; /* N : maximum spindle number */
    

    The messages for alarm number 1,..,38 are as follows. The alarm except the following doesn't have the message.

    01 : MOTOR OVERHEAT 25 : SERIAL TRANS.STOP
    02 : SPEED ERR.EXCESS 26 : CS-VEL.DISCONNECT
    03 : FUSE IN DC LINK 27 : POSITION CODER DISCONNECT
    04 : FUSE IN AC INPUT 28 : CS-POSITION DISCONNECT
    05 : FUSE ON P.C.B. 29 : OVERLOAD
    07 : OVER SPEED 30 : INPUT OVER CURRENT
    09 : HEATSINK OVERHEAT 31 : PG DISCONNECT
    10 : LOW VOLTAGE 32 : SERIAL RAM ERROR
    11 : DC LINK OVER VOLTAGE 33 : DC LINK LOW VOLTAGE
    12 : DC LINK OVER CURRENT 34 : PARAMETER SETTING ERROR
    13 : MEMORY ERROR 35 : GEAR RATIO SETTING ERROR
    18 : SUM CHECK ERROR 36 : ERR.COUNT.OVERFLOW
    19 : U PHASE OFFSET 37 : SPEED DETECTION
    20 : V PHASE OFFSET 38 : MG SENSOR SIGNAL
    24 : SERIAL DATA ERROR

    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdspindleid2

    Read specified spindle id information from adaptation device.

    Each information is stored in member of the ODBCSPID2 structure.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspindleid2(unsigned short FlibHndl, short sp, short type, ODBCSPID2 *spindleid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled spindle number of reading spindle ID information.

    type in

    Specify the type of reading data for spindle ID information. The type which can be specified is as follows.

    0 Main SP motor specification
    1 Main SP motor serial number
    2 Sub SP motor specification
    3 Sub SP motor serial number
    4 SP specification
    5 SP serial number
    6 PS specification
    7 PS serial number
    8 PS software series edition
    -1 All of the above-mentioned data kind
    spindleid out

    Specify the pointer to a variable of ODBCSPID2 structure for setting spindle ID information. The details of members of ODBCSPID2 structure are as follows. "NULL ('\0')" is added to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Main SP motor specification */
        char   mt_srn[10] ;        /* Main SP motor serial number */
        char   sbmt_spc[20] ;      /* Sub SP motor specification */
        char   sbmt_srn[10] ;      /* Sub SP motor serial number */
        char   spm_spc[22] ;       /* SP specification */
        char   spm_srn[12] ;       /* SP serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   pss_see[9] ;        /* PS software series edition */
    } ODBCSPID2 ;
    

    ERRORS

    Code Description

    motor\cnc_rdsrvspeed

    Reads "The servo adjustment real speed".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsrvspeed(unsigned short FlibHndl,long *speed);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    speed out

    Specify the address of the array to store the real speed for servo adjustment. The number of array must be equal to the number of maximum controlled axis. The data within the number of controlled axis is valid.

        long    speed[MAX_AXIS] ; /* MAX_AXIS : maximum controlled axes */
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    motor\cnc_rdsynerrrg

    Reads "The synchronous error for spindle adjustment" in the rigid tapping mode.

    The synchronous error in the synchronous control mode is able to be acquired by cnc_rdsynerrsy function.

    This synchronous error is valid only during the rigid tapping mode.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsynerrrg(unsigned short FlibHndl,long *synerr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    synerr out

    Specify the address of the variable to store the synchronous error in the rigid tapping mode.


    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_rdsynerrsy

    Reads "The synchronous error for spindle adjustment" in the synchronous control mode.

    The synchronous error in the rigid tapping mode is able to be acquired by cnc_rdsynerrrg function.

    This synchronous error is valid only during the synchronous control mode.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsynerrsy(unsigned short FlibHndl,long *synerr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    synerr out

    Specify the address of the variable to store the synchronous error in the synchronous control mode.


    ERRORS

    Code Description
    EW_NOOPT no option
    The serial spindle function and the extended driver/library function are necessary.

    motor\cnc_wrfromservoid2

    Write specified servo id information to FROM.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrfromservoid2(unsigned short FlibHndl, short axis, ODBCSVID2 *servoid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled axis number of writing servo ID information.

    servoid in

    Specify the pointer to a variable of ODBCSVID2 structure to set servo ID information. The details of members of ODBCSVID2 structure are as follows. Specify "NULL ('\0')" to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Servo motor specification */
        char   mt_srn[10] ;        /* Servo motor serial number */
        char   plc_spc[22] ;       /* Pulse coder specification */
        char   plc_srn[9] ;        /* Pulse coder serial number */
        char   svm_spc[22] ;       /* SV specification */
        char   svm_srn[12] ;       /* SV serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   svs_see[9] ;        /* SV software series edition */
        char   pss_see[9] ;        /* PS software series edition */
        char   pm1_spc[22] ;       /* Separator 1 specification */
        char   pm1_srn[9] ;        /* Separator 1 serial number */
        char   pm2_spc[22] ;       /* Separator 2 specification */
        char   pm2_srn[9] ;        /* Separator 2 serial number */
    } ODBCSVID2 ;
    

    ERRORS

    Code Description

    motor\cnc_wrfromspindleid2

    Write specified spindle id information to FROM.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrfromspindleid2(unsigned short FlibHndl, short sp, ODBCSPID2 *spindleid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.See "Library handle" for details.

    axis in

    Specify the controlled axis number of writing spindle ID information.

    spindleid in

    Specify the pointer to a variable of ODBCSPID2 structure to set spindle ID information. The details of members of ODBCSPID2 structure are as follows. Specify "NULL ('\0')" to the end of character strings.

    typedef struct {
        char   mt_spc[20] ;        /* Main SP motor specification */
        char   mt_srn[10] ;        /* Main SP motor serial number */
        char   sbmt_spc[20] ;      /* Sub SP motor specification */
        char   sbmt_srn[10] ;      /* Sub SP motor serial number */
        char   spm_spc[22] ;       /* SP specification */
        char   spm_srn[12] ;       /* SP serial number */
        char   psm_spc[22] ;       /* PS specification */
        char   psm_srn[12] ;       /* PS serial number */
        char   pss_see[9] ;        /* PS software series edition */
    } ODBCSPID2 ;
    

    ERRORS

    Code Description

    ncdata\cnc_getmactype

    Gets the type of custom macro variable which is used by cnc_rdmacro, cnc_wrmacro, cnc_rdmacror, cnc_wrmacror functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getmactype(unsigned short FlibHndl, short *macro_type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    macro_type out
    Pointer to the custom macro variable type.
    0 : decimal form floating-point type (default)
    none zero : binary form floating-point type

    ERRORS

    Code Description

    ncdata\cnc_getpmactype

    Gets the type of P code macro variable which is used by cnc_rdpmacro, cnc_wrpmacro, cnc_rdpmacror, cnc_wrpmacror functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_getpmactype(unsigned short FlibHndl, short *pmacro_type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pmacro_type out
    The pointer to the type of P code macro variable
    0 : decimal form floating-point type (default)
    none zero : binary form floating-point type

    ERRORS

    Code Description

    ncdata\cnc_hpccactfine

    Reads fine level for high-speed and high-precision machining.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_hpccactfine(unsigned short FlibHndl, short *fine);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    fine out

    Current fine level is returned.

    0 : fine
    1 : medium
    2 : rough

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    ncdata\cnc_hpccatset

    Commands CNC to set the setting data for high-speed and high-precision machining automatically.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_hpccatset(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    - Protection KEY(DI/KEY2) is off.
    - CNC parameter is a state of write-protection.
    EW_PARAM CNC parameter error
    Setting data cannot be set automatically.
    EW_MODE CNC mode error
    The mode is not in MDI.

    ncdata\cnc_hpccattune

    Commands CNC to tune up the tuning data for high-speed and high-precision machining automatically.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_hpccattune(unsigned short FlibHndl, short fine, short *stat);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    fine in

    Specify the fine level which is used at automatic tuning-up.

    0 : fine
    1 : medium
    2 : rough
    stat out

    Result status at automatic tuning-up will be set(only Series 15).
    The meaning of each bit is as follows.
    All bits are always zeros for Series 15i.

    bit 0 : Time constant for after IPL has been set to maximum value.
    bit 1 : Time constant for after IPL has been set to minimum value.
    bit 2 : Coefficient of feed forward has been set to maximum value.
    bit 3 : Coefficient of feed forward has been set to minimum value.
    bit 4,..,15 : (not used)

    * When a bit is on, it means CNC has set the tuning data as the corresponding state.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_DATA Data error
    Fine level(fine) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    - Protection KEY(DI/KEY2) is off.
    - CNC parameter is a state of write-protection.
    EW_PARAM CNC parameter error
    Setting data cannot be tuned up automatically.
    EW_MODE CNC mode error
    The mode is not in MDI.
    EW_REJECT CNC execution rejected
  • Series 15
  • Setting data(fine level, max. feedrate, time constant before interpolation) are not set.
  • Series 15i
  • Setting data(finish level, acceleration for acceleration/deceleration before interpolation(Acc for BIPL), parameter No.1825 for servo loop gain) are not set.

    ncdata\cnc_hpccselfine

    Selects fine level for high-speed and high-precision machining.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_hpccselfine(unsigned short FlibHndl, short fine);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    fine in

    Specify the fine level.

    0 : fine
    1 : medium
    2 : rough

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_DATA Data error
    Fine level(fine) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    CNC parameter is a state of write-protection.
    EW_MODE CNC mode error
    The mode is not in MDI.

    ncdata\cnc_rdactfixofs

    Reads the active fixture offset number and the active fixture offset value specified by "axis". The offset number is stored in "type" of "IODBZOFS" with binary format, and the offset value is stored in "data" array of "IODBZOFS" with signed binary format.

    The value for all axes can be read at a time by specifying 'ALL_AXES' in 'axis'.

    The place of decimal point can be got by cnc_getfigure function.

    The unit of active fixture offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdactfixofs(unsigned short FlibHndl, short axis, IODBZOFS *fixofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes(ALL_AXES=-1)
      1,..,m : assigns 1 axis (m=current controlled axes)
    fixofs out

    Pointer to the IODBZOFS structure for the active fixture offset value. The IODBZOFS structure is as follows.

    typedef struct  iodbzofs {
            short   datano;         /* active offset number */
            short   type;           /* axis number          */
            long    data[MAX_AXIS]; /* offset data value    */
    } IODBZOFS ;         /* MAX_AXIS : max. controlled axes */
    

    IODBZOFS

    1 axis all axes

    n = Maximum controlled axes (* The data for current controlled axes are valid.)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    The rotary table dynamic fixture offset option and the extended driver/library function are necessary.
    The custom macro B option is necessary(only 16i/18i/21i).

    ncdata\cnc_rdbaxis

    Reads the command data for B axis(current command, next command).

    The unit of command data is as follows.

    • Series 16/18/21, 16i/18i/21i
    • 1004#1
      (ISC)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      IS-B 0 0.001 0.0001
      IS-C 1 0.0001 0.00001

    The unit of speed is as follows.

    • Series 16/18/21, 16i/18i/21i
    • mm input
      [mm]
      inch input
      [inch]
      G98 1 0.01
      G99 0.0001 0.000001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdbaxis(unsigned short FlibHndl, ODBBAXIS *baxis);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    baxis out

    Pointer to the ODBBAXIS structure for the command data for B axis. The ODBBAXIS structure is as follows.

    typedef struct odbbaxis {
            short           flag ;        /* existence of command  */
            short           command ;     /* command               */
            unsigned short  speed ;       /* speed                 */
            long            sub_data ;    /* supplement of command */
    } ODBBAXIS ;
    
    ODBBAXIS    baxis[2] ;
    
            baxis[0] : current command data
            baxis[1] : next command data
    
    flag
    existence of command
    0 : none
    1 : Exists
    command
    command
    Attributes are as follows.
    bit 0,1,2 : command code
    0 : G00
    1 : G01
    2 : G04
    3 : G28
    4 : M
    5 : S
    6 : T
    bit 3 - 11 : (reserve)
    bit 12 : G99/G98 (for display of speed)
    0 : G98
    1 : G99
    bit 13 - 15 : (reserve)

    speed
    speed
    valid at current command data and G01 mode
    sub_data
    supplement of command
    G00, G01 : motion value
    G04 : dwell time
    G28 : (invalid)
    M, S, T : command code

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_NOOPT No option
    The B axis control option and the extended driver/library function are necessary.

    ncdata\cnc_rdbtofsinfo

    Reads the memory type of tool offset for B axis, the available number and the auxiliary function number which means offset cancel. These are stored in "ofs_type", "use_no" and "sub_no" of "ODBBTLINF" with binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdbtofsinfo(unsigned short FlibHndl, ODBBTLINF *btlinf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    btlinf out

    Pointer to the ODBBTLINF structure for the tool offset information for B axis. The ODBBTLINF structure is as follows.

    typedef struct  odbbtlinf {
            short   ofs_type;       /* memory type          */
            short   use_no;         /* available number     */
            short   sub_no;         /* aux. function number */
    } ODBBTLINF ;
    
    ofs_type
    Memory type of tool offset for B axis
    0 : memory type A
    1 : memory type B

    use_no
    Available number of tool offset for B axis

    sub_no
    Auxiliary function number which means offset cancel (CNC parameter 8257)
    The tool offset auxiliary function number is from next number of this number to this number + 9.

      Ex.) 8257=50 : Auxiliary function number 51,...,59



    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_NOOPT No option
    The B axis control option and the extended driver/library function are necessary.

    ncdata\cnc_rdbtofsr

    Reads the tool offset value for B axis specified by "s_number", "e_number", "type". The offset value is stored in "IODBBTO" with signed binary format.

    The unit of offset value is the same as cnc_rdtofs function. See the description of cnc_rdtofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdbtofsr(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBBTO *btofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start tool offset number. The available number is 1,...,9.

    'This number + aux. function number which can be got by cnc_rdbtofsinfo function + 1' means the tool offset number for B axis which is used by NC command or display.

    e_number in

    Specify the end tool offset number. The available number is 1,...,9.

    type in

    Specify the tool offset type.(see the following table)

    length in

    Specify the data block length.

    The combinations of the value specified in "type", the data block length "length", the kind of offset value to be read and the member where the result is stored are as follows.

    • Tool offset Memory A
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool offset btofsr.ofs[i]
      -1 8+4*N all Tool offset btofsr.ofs[i]

    • Tool offset Memory B
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool geometry offset btofsr.ofs[i]
      1 8+4*N individual Tool wear offset btofsr.ofs[i]
      -2 8+8*N all Tool geometry offset btofsr.ofs[8*i+0]
      Tool wear offset btofsr.ofs[8*i+4]

      is number of offset to be read, i = 0,..,(N-1).
    btofsr out

    Pointer to the IODBBTO structure including the tool offset value. The IODBBTO structure is as follows.

    typedef struct iodbbto {
        short datano_s;             /* start offset number */
        short type;                 /* offset type */
        short datano_e;             /* end offset number */
        long  ofs[M];               /* offset value */
    } IODBBTO ; /* M : M is number of the offset value.(Individual, Memory A all)
                       M is number of the offset value * 2.(Memory B all) */
    

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBBTO structure (length) is wrong.
    EW_NUMBER Data number error
    Offset number (s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Offset type (type) is wrong.
    EW_NOOPT No option
    The B axis control option and the extended driver/library function are necessary.

    ncdata\cnc_rdexecmcode

    Reads specified number of executing or executed M codes, starting from the M code group with specified number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdexecmcode(unsigned short FlibHndl, short s_no, short *num, ODBEXEM *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify M code group number.

    num in / out

    Pointer to the number of M code groups to be read.
    Specify the number of M code groups to be read before function call and actual number of M code groups being read is stored after the function call.

    buf out

    Pointer to the ODBEXEM structure where returned data are stored. The ODBEXEM structure is as follows.

    typedef struct odbexem {
        short   grp_no;
        short   mem_no;
        struct{
            long    no;
            short   flag;
        }m_code[5];
        char    m_name[21];
        char    dummy;
    } ODBEXEM;
    
    grp_no
    M code group number
    M code group number is returned.

    mem_no
    The number of the M codes memorized.
    The number of the M codes memorized in the group is returned.

    m_code[N].no
    M code
    The latest five M codes in the group are returned. (N: 0,..,4)

    m_code[N].flag
    Executed / Executing flag
    Flags to indicate whether above M codes in m_code[N].no are executed or executing.
    0 : executed
    1 : executing
    Executed / Executing flags for latest five M codes in the group are returned. (N: 0,..,4)

    m_name
    M code name.
    The name of the latest M code command in the group is returned. ASCII character string ( max. 20 characters) with trailing NULL code is stored.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number indication(num) is wrong.
    EW_NUMBER Data number error
    The start number(s_no) is wrong.
    EW_NOOPT No option
    The M code group option and the extended driver/library function are necessary.

    ncdata\cnc_rdfixofs

    Reads the fixture offset value specified by "s_number", "e_number", "axis". The offset value is stored in "data" array of "IODBZOR" with signed binary format.

    The value for all axes can be read at a time by specifying 'ALL_AXES' in 'axis'.

    The place of decimal point can be got by cnc_getfigure function.

    The unit of fixture offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdfixofs(unsigned short FlibHndl, short s_number, short axis, short e_number, short length, IODBZOR *fixofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start fixture offset number. Available number is from 1 to 8.

    e_number in

    Specify the end fixture offset number. Available number is from 1 to 8.

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes (ALL_AXES=-1)
      1,..,m : assigns 1 axis (m=current controlled axes)
    length in

    Specify the data block length (size of IODBZOR structure).

    8+4*(number of axes)*(number of offset)

    IODBZOR

    1 axis all axes

    n = Maximum controlled axes (* The data for current controlled axes are valid.))
    K = Number of offset to be read

    fixofsr out

    Pointer to the IODBZOR structure for the fixture offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
            short   datano_s;         /* start offset number */
            short   type;             /* axis number */
            short   datano_e;         /* end offset number */
            long    data[MAX_AXIS*K]; /* offset data value */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes */
                      /* K : number of offset */
    

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_LENGTH Data block length error
    Size of IODBZOR structure(length) is wrong.
    EW_NUMBER Data number error
    Fixture offset number(s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    The rotary table dynamic fixture offset option and the extended driver/library function are necessary.

    ncdata\cnc_rdhpccset

    Reads setting data for High-speed and high-precision machining. The data is stored in each member of "IODBHPST".

    This function is not supported on Series 15i. The function which reads CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data which are read by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhpccset(unsigned short FlibHndl, IODBHPST *hpst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hpst out

    Pointer to the IODBHPST structure for the setting data for High-speed and high-precision machining. The IODBHPST structure is as follows.

    typedef struct iodbhpst {
        short   slct;       /* flag of valid data */
        short   hpcc;       /* high precision contour control */
        short   multi;      /* multi buffer */
        short   ovr1;       /* override by Z-axis down */
        short   ign_f;      /* ignore feed at program */
        short   foward;     /* feed forward */
        long    max_f;      /* maximum feed of high precision */
                            /*                contour control */
        short   ovr2;       /* override at area 2 */
        short   ovr3;       /* override at area 3 */
        short   ovr4;       /* override at area 4 */
        long    reserve[7]; /* (not used) */
    } IODBHPST ;
    
    slct
    Flag of valid data is set.

    bit 0 : high precision contour control
    bit 1 : multi buffer
    bit 2 : override by Z-axis down
    bit 3 : ignore feed at program
    bit 4 : feed forward
    bit 5 : maximum feed of high precision contour control
    bit 6 : override at area 2
    bit 7 : override at area 3
    bit 8 : override at area 4
    bit 9,..,15 : (not used)

    * When a bit is 0, it means the CNC does not have the related option, then the corresponding data has no meaning.

    hpcc
    Valid/invalid of high precision contour control is set.

    0 : invalid
    1 : valid

    multi
    Valid/invalid of multi buffer is set.

    0 : invalid
    1 : valid

    ovr1
    Valid/invalid of override by Z-axis down is set.

    0 : invalid
    1 : valid

    ign_f
    Valid/invalid of ignore feed at program is set.

    0 : invalid
    1 : validる

    foward
    Valid/invalid of feed forward is set.

    0 : invalid
    1 : valid

    max_f
    Maximum feed of high precision contour control is set.

    ovr2
    Override at area 2 is set.

    ovr3
    Override at area 3 is set.

    ovr4
    Override at area 4 is set.

    reserve[7]
    (not used)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series
    EW_NOOPT No option
    The extended driver/library function is necessary.

    ncdata\cnc_rdhpcctuac

    Reads tuning data(acc./dec. input) for high-speed and high-precision machining. The data is stored in each member of "IODBHPAC".

    This function is not supported on Series 15i. The function which reads CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data which are read by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhpcctuac(unsigned short FlibHndl, IODBHPAC *hpac);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hpac out

    Pointer to the IODBHPAC structure for the tuning data(acc./dec. input) for high-speed and high-precision machining. The IODBHPAC structure is as follows.

    typedef struct iodbhpac {
        struct {
            short   slct;       /* flag of valid data */
            short   diff;       /* flag of data status */
            short   fine;       /* fine level */
            short   acc_lv;     /* acceleration/deceleration level*/
            long    bipl;       /* acceleration for before IPL */
            short   aipl;       /* time constant for after IPL */
            long    corner;     /* difference of corner feed */
            long    clamp;      /* acceleration for clamp */
            long    c_acc;      /* acceleration of feed clamp by */
                                /*               radius of cercle*/
            long    foward;     /* coefficient of feed forward */
            long    reserve[8]; /* (not used) */
        }tune[3]
    } IODBHPAC ;
    
    hpac.tune[0].slct,...,hpac.tune[0].reserve
                                    : tuning data for fine level
    hpac.tune[1].slct,...,hpac.tune[1].reserve
                                    : tuning data for medium level
    hpac.tune[2].slct,...,hpac.tune[2].reserve
                                    : tuning data for rough level
    
    slct
    Flag of valid data is set.

    bit 0 : fine level
    bit 1 : acceleration/deceleration level
    bit 2 : acceleration for before IPL
    bit 3 : time constant for after IPL
    bit 4 : difference of corner feed
    bit 5 : acceleration for clamp
    bit 6 : acceleration of feed clamp by radius of circle
    bit 7 : coefficient of feed forward
    bit 8,..,15 : (not used)

    * When a bit is 0, it means the CNC does not have the related option, then the corresponding data has no meaning.

    diff
    Each bit indicates whether the corresponding data is common for all axes, or not.

    bit 0,..,2 : (not used)
    bit 3 : time constant for after IPL
    bit 4 : difference of corner feed
    bit 5 : acceleration for clamp
    bit 6 : (not used)
    bit 7 : coefficient of feed forward
    bit 8,..,15 : (not used)

    * When the bit value is 0, it means the corresponding data is applied commonly to all axes.

    fine
    Fine level is set.

    acc_lv
    Acceleration/deceleration level is set.

    bipl
    Acceleration for before IPL is set.

    aipl
    Time constant for after IPL is set.

    corner
    Difference of corner feed is set.

    clamp
    Acceleration for clamp is set.

    c_acc
    Acceleration of feed clamp by radius of circle is set.

    foward
    Coefficient of feed forward is set.

    reserve[8]
    (not used)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    ncdata\cnc_rdhpcctupr

    Reads tuning data(parameter input) for high-speed and high-precision machining. The data is stored in each member of "IODBHPPR".

    This function is not supported on Series 15i. The function which reads CNC parameter ( cnc_rdparam or cnc_rdparar ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data which are read by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhpcctupr(unsigned short FlibHndl, IODBHPPR *hppr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hppr out

    Pointer to the IODBHPPR structure for the tuning data(parameter input) for high-speed and high-precision machining. The IODBHPPR structure is as follows.

    typedef struct iodbhppr {
        struct {
            short   slct;       /* flag of valid data */
            short   diff;       /* flag of data status */
            short   fine;       /* fine level */
            short   acc_lv;     /* acceleration/deceleration level*/
            long    max_f;      /* maximum feed */
            short   bipl;       /* time constant for before IPL */
            short   aipl;       /* time constant for after IPL */
            long    corner;     /* difference of corner feed */
            short   clamp;      /* clamp by acceleration */
            long    radius;     /* radius of feed clamp by radius*/
                                /*                      of circle*/
            long    max_cf;     /* maximum feed of feed clamp by */
                                /*               radius of circle*/
            long    min_cf;     /* minimum feed of feed clamp by */
                                /*               radius of circle*/
            long    foward;     /* coefficient of feed forward */
            long    reserve[5]; /* (not used) */
        }tune[3]
    } IODBHPPR ;
    
    hppr.tune[0].slct,...,hppr.tune[0].reserve
                                    : tuning data for fine level
    hppr.tune[1].slct,...,hppr.tune[1].reserve
                                    : tuning data for medium level
    hppr.tune[2].slct,...,hppr.tune[2].reserve
                                    : tuning data for rough level
    
    slct
    Flag of valid data is set.

    bit 0 : fine level
    bit 1 : acceleration/deceleration level
    bit 2 : maximum feed
    bit 3 : time constant for before IPL
    bit 4 : time constant for after IPL
    bit 5 : difference of corner feed
    bit 6 : clamp by acceleration
    bit 7 : radius of feed clamp by radius of circle
    bit 8 : maximum feed of feed clamp by radius of circle
    bit 9 : minimum feed of feed clamp by radius of circle
    bit10 : coefficient of feed forward
    bit11,..,15 : (not used)

    * When a bit is 0, it means the CNC does not have the related option, then the corresponding data has no meaning.

    diff
    Each bit indicates whether the corresponding data is common for all axes, or not.

    bit 0,..,3 : (not used)
    bit 4 : time constant for after IPL
    bit 5 : difference of corner feed
    bit 6 : clamp by acceleration
    bit 7,..,9 : (not used)
    bit10 : coefficient of feed forward
    bit11,..,15 : (not used)

    * When the bit value is 0, it means the corresponding data is applied commonly to all axes.

    fine
    Fine level is set.

    acc_lv
    Acceleration/deceleration level is set.

    max_f
    Maximum feed is set.

    bipl
    Time constant for before IPL is set.

    aipl
    Time constant for after IPL is set.

    corner
    Difference of corner feed is set.

    clamp
    Clamp by acceleration is set.

    radius
    Radius of feed clamp by radius of circle is set.

    max_cf
    Maximum feed of feed clamp by radius of circle is set.

    min_cf
    Minimum feed of feed clamp by radius of circle is set.

    foward
    Coefficient of feed forward is set.

    reserve[5]
    (not used)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    ncdata\cnc_rdhsparam

    The CNC parameter shown by parameter information is read at high speed.
    The parameter can be read according to parameter information acquired by cnc_rdhsprminfo. The reading speed is high more than cnc_rdparar.


    When specified parameter information is illegal, the operation of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhsparam(unsigned short FlibHndl, long num_prm, HSPINFO *info, HSPDATA *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    num_prm in

    Specify the numbers of parameter which wants to read.

    info in

    Specify the pointer to the array of HSPINFO structure where parameter information was stored.

    When parameter information of numbers which specified by num_prm is not stored, the operation of this function is not guaranteed.

    data out

    Specify the pointer to the array of HSPDATA union to store the value of the got parameter. HSPDATA union is as follows.

    typedef union hspdata {
        char    cdata[MAX_AXIS];
        short   idata[MAX_AXIS];
        long    ldata[MAX_AXIS];
    } HSPDATA;
    
    * For the parameter of the axis type:
    The parameter of numbers of the control axis is read.
    (The data from the top of the array to numbers of the control axis is effective.)
    * For the parameter which is not the axis type:
    The read parameter is stored at the top of array.

    When the area to store the parameter data of numbers which specified by num_prm is not prepared, the operation of this function is not guaranteed.


    ERRORS

    Code Description
    EW_LENGTH Data length error
    the numbers of specified parameter is wrong.
    EW_NUMBER Data number error
    The parameter shown by parameter information does not exist.
    EW_NOOPT No option
    EW_PROT Protection error
    Specified parameter is protected.

    ncdata\cnc_rdhsprminfo

    Get information for high-speed read of parameter.
    Got parameter information is effective until the reboot of CNC.
    Moreover, got parameter information is available to another thread of this application.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhsprminfo(unsigned short FlibHndl, long prm_no, HSPINFO *info);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prm_no in

    Specify the parameter number

    info out

    Specify the pointer to HSPINFO structure to store the parameter information is specified.

    Got parameter information is used by cnc_rdhsparam.
    If you change the parameter information, the result of cnc_rdhsparam is not guaranteed. Never change the parameter information by your application.


    ERRORS

    Code Description
    EW_NUMBER Data number error
    The specified parameter number does not exist.
    EW_NOOPT No option
    EW_PROT Protected parameter
    The specified parameter is protected.

    ncdata\cnc_rdintchk

    Reads the coordinate value of interference check area specified by "s_number", "e_number", "type".

    The coordinate value is stored in "data" array of "IODBINT" with signed binary format.

    All value can be read at a time by specifying ALL_AXES for "axis".

    The places of decimal points can be got by cnc_getfigure function.

    The unit of coordinate value is the same as "Read work zero offset value( cnc_rdzofs )". See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdintchk(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBINT *intchk);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start interference check data number.
    The available number of interference check data can be got by cnc_rdintinfo function.

    e_number in

    Specify the end interference check data number.

    type in

    Specify the type of coordinate.

    ALL_AXES : assigns all coordinates (ALL_AXES=-1)
    1,..,m : assigns 1 coordinate (T series:m=7, M series:m=5)

    In case of 1 coordinate, 'type' is as follows.

    T series type coordinate
    0 X (area 1)
    1 Z (area 1)
    2 I (area 1)
    3 K (area 1)
    4 X (area 2)
    5 Z (area 2)
    6 I (area 2)
    7 K (area 2)
    M series type coordinate
    0 X
    1 Y
    2 Z
    3 I
    4 J
    5 K
    length in

    Specify the data block length(size of IODBINT structure).

    (8+4*(number of coordinate)*(number of data))

    T series

    IODBINT

    1 coordinate all coordinate
    K : Number of data to be read

    M series

    IODBINT

    1 coordinate all coordinate

    intchk out

    Pointer to the IODBINT structure for the coordinate value of interference check data. The IODBINT structure is as follows.

    typedef struct  iodbint {
            short   datano_s;       /* start data number */
            short   type;           /* coordinate type   */
            short   datano_e;       /* end data number   */
            long    data[8*K];      /* coordinate value  */
    } IODBINT ;     /* K : number of data to be read     */
    
    * In case of all coordinate, refer to length, type for sequence of data.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used without 2 path control function.
    EW_LENGTH Data block length error
    Size of IODBINT structure(length) is wrong.
    EW_NUMBER Data number error
    Data number(s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Type of coordinate(type) is wrong.
    EW_NOOPT No option
    The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary.

    ncdata\cnc_rdintinfo

    Reads the available number of interference check data.
    It is stored in (*intinf) with binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdintinfo(unsigned short FlibHndl, short *intinf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    intinf out

    Pointer to the available number of interference check data.
    The available number is as follows.

    • Series 15
    • T series 16/32/80 sets(each path)

    • Series 16/18, 16i/18i, 0i-F, 30i
    • M series 1 set(each path)
      T series 16/32/64 sets(each path)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used without 2 path control function.
    EW_NOOPT No option
    The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary.

    ncdata\cnc_rdmacro

    Reads the custom macro variable specified by "number". The data is stored in "ODBM" with signed binary format.

    The kinds of custom macro variable are as follows.

    1. Local variable (#1,..,#33)
    2. The local variables which belong to the macro program just being executed when the application program calls this function are read.
    3. Common variable (#100,..,#999)
    4. See the description of cnc_rdmacroinfo function about the available range of common variables.
    5. System variable (#1000,..,#9999)

    It is possible to exchange the type of macro variable by cnc_setmactype function.

    • decimal form floating-point type (data format=M*10**(-E))

    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range:999999999,..,-999999999)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

      mcr_val always returns by nine digits and adjusts the amount with the value of dec_val.


      Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
      mcr_val = 123450000
      dec_val = 7
    • binary form floating-point type (data format=M*2**(-E))

    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmacro(unsigned short FlibHndl, short number, short length, ODBM *macro);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the custom macro variable number.

    length in

    Specify the data block length (size of ODBM structure=10).

    ODBM

    macro out

    Pointer to the ODBM structure including the custom macro variable. The ODBM structure is as follows.

    typedef struct  odbm {
        short   datano ;    /* custom macro variable number */
        short   dummy ;     /* (not used) */
        long    mcr_val ;   /* value of custom macro variable */
        short   dec_val ;   /* number of places of decimals */
    } ODBM ;
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ODBM structure(length) is wrong.
    EW_NUMBER Data number error
    Custom macro variable number(number) is wrong.
    EW_NOOPT No option
    This function needs the custom macro option.

    ncdata\cnc_rdmacroinfo

    Reads the available number of the local macro variable and the common macro variable. Those are stored in "use_no1", "use_no2" of "ODBMVINF" with signed binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmacroinfo(unsigned short FlibHndl, ODBMVINF *mvinf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mvinf out

    Pointer to the ODBMVINF structure including the custom macro variable information. The ODBMVINF structure is as follows.

    typedef struct  odbmvinf {
            short   use_no1 ;       /* number of local variable */
            short   use_no2 ;       /* indicator of common variable */
    } ODBMVINF ;
    
    use_no1
    use_no1 Available number of local macro variable (33 sets)

    use_no2
    Indicator of available common variable

    • Series 15
    • M/T 0 : 100,..,149, 500,..,549
      1 : 100,..,199, 500,..,599
      2 : 100,..,199, 500,..,699
      3 : 100,..,199, 500,..,999

      TT 0 : 100,..,149, 500,..,524
      1 : 100,..,149, 500,..,549
      2 : 100,..,149, 500,..,599
      3 : 100,..,149, 500,..,749

    • Series 15i
    • 3 : 100,..,199, 500,..,999
      4 : 100,..,199, 200,..,999

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • 0 : 100,..,149, 500,..,531
      1 : 100,..,199, 500,..,999
      2 : 100,..,199, 500,..,599

    • Series 16i/18i-W
    • 0 : 100,..,149, 500,..,531
      1 : 100,..,314, 500,..,699
      2 : 100,..,149, 500,..,699
      3 : 100,..,314, 500,..,531
      4 : 100,..,149, 500,..,999
      5 : 100,..,314, 500,..,999

    • Power Mate i
    • 0 : 100,..,149, 500,..,531
      1 : 100,..,199, 500,..,999
      2 : 100,..,199, 500,..,699

    • Series 30i/31i/32i, 0i-D/F, PMi-A
    • 0 : 100,..,149, 500,..,549
      1 : 100,..,199, 500,..,999
      2 : 100,..,149, 200,..,499, 500,..,549
      3 : 100,..,499, 500,..,999
      4 : 100,..,199, 500,..,999, 98000,..,98499
      5 : 100,..,499, 500,..,999, 98000,..,98499
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mvinf out

    Pointer to the ODBMVINF structure including the custom macro variable information. The ODBMVINF structure is as follows.

    typedef struct  odbmvinf {
            short   use_no1 ;       /* number of local variable */
            short   use_no2 ;       /* indicator of common variable */
    } ODBMVINF ;
    
    use_no1
    use_no1 Available number of local macro variable (33 sets)

    use_no2
    Indicator of available common variable
    0 : 100,..,149, 500,..,549
    1 : 100,..,199, 500,..,999
    2 : 100,..,149, 200,..,499, 500,..,549
    3 : 100,..,199, 200,..,499, 500,..,999
    4 : 100,..,199, 500,..,999, 98000,..,98499
    5 : 100,..,499, 500,..,999, 98000,..,98499

    ERRORS

    Code Description
    EW_NOOPT No option
    This function needs the custom macro option.

    ncdata\cnc_rdmacror

    Reads the custom macro variable specified by "datano_s", "datano_e". The data is stored in "IODBMR" with signed binary format.

    The kinds of custom macro variable are as follows.

    1. Local variable (#1,..,#33)
    2. The local variables which belong to the macro program just being executed when the application program calls this function are read.
    3. Common variable (#100,..,#999)
    4. See the description of cnc_rdmacroinfo function about the available range of common variables.

    It is possible to exchange the type of macro variable by cnc_setmactype function.

    • decimal form floating-point type (data format=M*10**(-E))
    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range:999999999,..,-999999999)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

      mcr_val always returns by nine digits and adjusts the amount with the value of dec_val.


      Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
      mcr_val = 123450000
      dec_val = 7
    • binary form floating-point type (data format=M*2**(-E))
    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmacror( unsigned short FlibHndl, short s_number, short e_number, short length, IODBMR *macror );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start custom macro variable number.

    e_number in

    Specify the end custom macro variable number.

    length in

    Specify the data block length (size of IODBMR structure).

    8+8*(Number of custom macro variable)

    IODBMR

    N : Number of custom macro variable

    macror out

    Pointer to the IODBMR structure including the custom macro variable. The IODBMR structure is as follows.

    typedef struct iodbmr {
        short datano_s; /* start custom macro variable number*/
        short dummy;    /* (not used) */
        short datano_e; /* end custom macro variable number */
        struct {
            long  mcr_val; /* value of custom macro var. */
            short dec_val; /* number of places of decimals*/
        } data[N];         /* N : number of variable */
    } IODBMR;
    
    datano_s
    The custom macro variable number which was read first is returned.

    datano_e
    The custom macro variable number which was read last is returned.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBMR structure(length) is wrong.
    EW_NUMBER Data number error
    Custom macro variable number(s_number, e_number) is wrong.
    EW_NOOPT No option
    This function needs the custom macro option.

    ncdata\cnc_rdmacror2

    Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The data is stored in "data" with double format. It is not influenced by setting of cnc_setmactype function.

    The kinds of custom macro variable are as follows.

    (1) Local variable (#1,..,#33)
    The local variables which belong to the macro program just being executed when the application program calls this function are read.
    (2) Common variable (#100,..,#999)
    See the description of cnc_rdmacroinfo function about the available range of common variables.
    (3) System variable (#1000〜)
    In case of system variable, the variable can be read one by one at a time.
    (4) Common variable (#98000〜#98499)
    See the description of cnc_rdmacroinfo function about the available range of common variables.

    The value of an undefined variable is called "vacant", and it is expressed as follows.

    0xFFFFFFFFFFFFFFFF

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmacror2(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, double *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start custom macro variable number.

    num in/out

    Specify pointer to the number of custom macro variable.
    The number which was read actually is returned.

    data out

    Pointer to the data of custom macro variable.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of custom macro variables(*num) is 0 or less.
    EW_NUMBER Data number error
    Custom macro variable number(s_no) is wrong.
    EW_NOOPT No option
    This function needs the custom macro option.

    ncdata\cnc_rdmacror3

    Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num".
    In this function, when you read the macro variable No. #500-#549, the macro name can be read together. In other variable numbers, NULL is read to the name.
    It is not influenced by setting of cnc_setmactype function.

    The kinds of custom macro variable are as follows.

    (1) Local variable (#1,..,#33)
    The local variables which belong to the macro program just being executed when the application program calls this function are read.
    (2) Common variable (#100,..,#999)
    See the description of cnc_rdmacroinfo function about the available range of common variables.
    (3) System variable (#1000〜)
    In case of system variable, the variable can be read one by one at a time.
    (4) Common variable (#98000〜#98499)
    See the description of cnc_rdmacroinfo function about the available range of common variables.

    The value of an undefined variable is called "vacant", and it is expressed as follows.

    0xFFFFFFFFFFFFFFFF

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmacror3(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, IODBMRN3 *mcr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start custom macro variable number.

    num in/out

    Specify pointer to the number of custom macro variable.
    The number which was read actually is returned.

    mcr out

    Pointer to the IODBMRN3 structure for the information of custom macro variable. The IODBMRN3 structure is as follows.

    typedef struct  iodbmrn {
        double  mcr_val ;   /* custom macro variable */
        char    name[32] ;  /* Macro name (includee NULL code) */
    } IODBMRN3 ;
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of custom macro variables(*num) is 0 or less.
    EW_NUMBER Data number error
    Custom macro variable number(s_no) is wrong.
    EW_NOOPT No option
    This function needs the custom macro option.

    ncdata\cnc_rdmgrpdata

    Reads specified number of M code group data starting from the specified number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmgrpdata(unsigned short FlibHndl, short s_no, short *num, ODBMGRP *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify starting number from which the data is read. Valid range is from 0 to 499.

    num in / out

    Pointer to the number of data to be read. Specify the number of data to be read before function call and actual number of data being read is stored after the function call. Valid range is from 1 to 500.

    buf out

    Pointer to the ODBMGRP structure where returned data are stored. The ODBMGRP structure is as follows.

    typedef struct odbmgrp {
        long    m_code;
        short   grp_no;
        char    m_name[21];
        char    dummy;
    } ODBMGRP;
    
    m_code
    M code
    M code is returned.
    * In case of Series 16/18 and 16i/18i, -1 is returned when no M code is assigned to the number.

    grp_no
    M code group number
    M code group number is returned.

    m_name
    M code name
    M code name is returned.
    ASCII character string (maximum 20 characters) with trailing NULL code is stored.
    * Not used in case of Series 16/18 and 16i/18i.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number indication(num) is wrong.
    EW_NUMBER Data number error
    The start number(s_no) is wrong.
    EW_NOOPT No option
    The M code group option and the extended driver/library function are necessary.

    ncdata\cnc_rdparainfo

    Reads the CNC parameter information specified by "s_number" and "read_no".

    The CNC parameter is basically non-continuous, and the attribute like the type and the size, etc. is different in each number. Use this function for such as displaying the parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparainfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBPARAIF *paraif);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start parameter number.

    read_no in

    Specify the number of parameter information to be read.

    paraif out

    Pointer to the ODBPARAIF structure including the parameter information. The ODBPARAIF structure is as follows.

    typedef struct odbparaif {
        unsigned short  info_no ;  /* number of parameter information */
        short   prev_no ;          /* previous parameter number */
        short   next_no ;          /* next parameter number */
        struct {
            short   prm_no ;       /* parameter number */
            short   prm_type ;     /* attribute of parameter */
        } info[N] ;     /* N is number of parameter information */
    } ODBPARAIF ;
    
    info_no
    Number of parameter information
    Number of the parameter information which has been read actually.
    prev_no
    Previous parameter number
    Previous effective number of parameter information which has been read first.
    next_no
    Next parameter number
    Next effective number of parameter information which has been read last.
    info[N].prm_no
    Parameter number
    Parameter number which exists actually.
    info[N].prm_type
    Attribute of parameter
    The following attributes are set.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • bit 0, 1 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : sign ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
      0 : with sign
      1 : without sign
      bit 4 : settings input
      0 : disable
      1 : enable
      bit 5 : write protection
      0 : enable
      1 : disable
      bit 6 : power must be off after writing
      0 : not necessary
      1 : necessary
      bit 7 : read protection
      0 : enable
      1 : disable
      bit 8 : spindle parameter ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
      0 : no spindle
      1 : spindle
      bit 9,..,15 : (reserve)

    • Series 15i
    • bit 0, 1 : (reserve)
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : (reserve)
      bit 4 : settings input
      0 : disable
      1 : enable
      bit 5 : write protection
      0 : enable
      1 : disable
      bit 6 : power must be off after writing
      0 : not necessary
      1 : necessary
      bit 7 : read protection
      0 : enable
      1 : disable
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      bit 12,..,15 : (reserve)

    • Series 30i, 0i-D/F, PMi-A
    • bit 0, 1 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type or real type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : sign
      0 : with sign
      1 : without sign
      bit 4 : settings input
      0 : disable
      1 : enable
      bit 5 : write protection
      0 : enable
      1 : disable
      bit 6 : power must be off after writing
      0 : not necessary
      1 : necessary
      bit 7 : read protection
      0 : enable
      1 : disable
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : (reserve)
      bit 12 : in case of type attribute = 3
      0 : except real type
      1 : real type
      bit 13,..,15 : (reserve)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start parameter number.

    read_no in

    Specify the number of parameter information to be read.

    paraif out

    Pointer to the ODBPARAIF structure including the parameter information. The ODBPARAIF structure is as follows.

    typedef struct odbparaif {
        unsigned short  info_no ;  /* number of parameter information */
        short   prev_no ;          /* previous parameter number */
        short   next_no ;          /* next parameter number */
        struct {
            short   prm_no ;       /* parameter number */
            short   prm_type ;     /* attribute of parameter */
        } info[N] ;     /* N is number of parameter information */
    } ODBPARAIF ;
    
    info_no
    Number of parameter information
    Number of the parameter information which has been read actually.
    prev_no
    Previous parameter number
    Previous effective number of parameter information which has been read first.
    next_no
    Next parameter number
    Next effective number of parameter information which has been read last.
    info[N].prm_no
    Parameter number
    Parameter number which exists actually.
    info[N].prm_type
    Attribute of parameter
    The following attributes are set.
    bit 0, 1 : type attribute
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type or real type
    bit 2 : array type attribute
    0 : except array type
    1 : array type
    bit 3 : sign
    0 : with sign
    1 : without sign
    bit 4 : settings input
    0 : disable
    1 : enable
    bit 5 : write protection
    0 : enable
    1 : disable
    bit 6 : power must be off after writing
    0 : not necessary
    1 : necessary
    bit 7 : read protection
    0 : enable
    1 : disable
    bit 8 : spindle parameter
    0 : no spindle
    1 : spindle
    bit 9,..,11 : (reserve)
    bit 12 : in case of type attribute = 3
    0 : except real type
    1 : real type
    bit 13,..,15 : (reserve)

    ERRORS

    Code Description
    EW_NUMBER Data number error
    Start parameter number (s_number) is wrong.

    ncdata\cnc_rdparainfo3

    Reads the CNC parameter information specified by "s_number" and "*read_no".

    The CNC parameter is basically non-continuous, and the attribute like the type and the size, etc. is different in each number.

    Use this function for such as displaying the parameter.


    This function can read the information of path type and machine group type of the parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparainfo3( unsigned short FlibHndl, short s_number, short* read_no, short* prev_no, short* next_no, ODBPARAIF2 info[] );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start parameter number.

    read_no in/out

    Specify the number of parameter information to be read.

    The number which was read actually is returned.

    prev_no out

    Pointer to valiable of the previous parameter number to read.

    After the function returns, parameter number which exists before the number indicated as s_number is set.

    next_no out

    Pointer to valiable of the next parameter number to read.

    After the function returns, parameter number which exists after the number to read is set.

    info out

    Pointer to the ODBPARAIF2 structure including the parameter information. The ODBPARAIF2 structure is as follows.

    typedef struct odbparaif2 {
        short   prm_no;         /* number of parameter */
        short   size;           /* parameter size */
        short   array;          /* arrange type */
        short   unit;           /* unit */
        short   dim;            /* dimension */
        short   input;          /* inout type */
        short   display;        /* display information */
        short   others;         /* other information */
    } ODBPARAIF2 ;
    
    info[N].prm_no
    number of parameter
    info[N].size
    parameter size
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2 word type
    4 : real number type
    info[N].array
    arrange type
    0 : independent type
    1 : axes type
    2 : spindle type
    3 : paths type
    4 : machine gorup type
    info[N].unit
    unit
    0 : except real number
    1 : input unit
    2 : output unit
    3 : offset unit
    info[N].dim
    dimension
    0 : except real number
    1 : length unit
    2 : angle unit
    3 : length + angle unit
    4 : velocity unit
    info[N].input
    input type
    0 : normal
    1 : setting parameter
    2 : input prohibit
    info[N].display
    display information
    bit 0 : symbol exist
    bit 1 : top of group
    bit 2 : bottom of group
    bit 3 : gap required
    info[N].others
    other information
    bit 0 : unsigned
    bit 1 : power off required
    bit 2 : not output
    bit 3 : not compared
    bit 4 : loader attribute

    ERRORS

    Code Description
    EW_NUMBER Data number error
    Start parameter number (s_number) is wrong.

    ncdata\cnc_rdparam

    Reads the parameter specified by "number","axis"(only for the parameter with axis). The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary format. Reads the parameter for all axes once by specifying 'ALL_AXES' in 'axis'. The parameter for each axis is stored in each array of "IODBPSD".

    The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is as follows, and can be got by cnc_rdparainfo function.

    Parameter type Meaning Byte size
    Bit parameter Every bits have each definition. 1
    Bit parameter with axis Every bits have each definition. (each axis) 1
    Byte parameter 1-byte data is stored. 1
    Byte parameter with axis 1-byte data is stored. (each axis) 1
    Word parameter 2-byte data is stored. 2
    Word parameter with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real parameter
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real parameter with axis
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparam(unsigned short FlibHndl, short number, short axis, short length, IODBPSD *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    length in

    Specify the data block length(size of IODBPSD structure).

    (4+(byte size of parameter)*(number of axis))

    In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param out

    Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* parameter number */
       short type;                /* upper byte:type */
                                  /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte parameter */
          short idata;            /* word parameter */
          long  ldata;            /* 2-word parameter */
          char  cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
          short idatas[MAX_AXIS]; /* word parameter with axis */
          long  ldatas[MAX_AXIS]; /* 2-word parameter with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Parameter number which was read is stored.
    type
    Attribute of parameter which was read is stored.
    Upper byte:type(only Series 15/15i)
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type (only Series 15i)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Real parameter is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    length in

    Specify the data block length(size of IODBPSD structure).

    (4+(byte size of parameter)*(number of axis))

    In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param out

    Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.

    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Parameter number which was read is stored.
    type
    Attribute of parameter which was read is stored.
      0 : no axis
      1,..,m : 1 axis(m=max. controlled axes)
      ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real parameter is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPSD structure(length) is wrong.
    EW_NUMBER Data number error
    Parameter number(number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_PASSWD Specified parameter cannot be read because the data is protected.
    ( Series 16i/18i/21i, 0i )

    ncdata\cnc_rdparam3

    Reads the parameter specified by "number","axis"(only for the parameter with axis).
    In this function, the acquired information can specify a relative axis or an absolute axis by argument("absolute").
    The relative axis means the current path and the absolute axis means all CNC paths.
    The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary format.

    Reads the parameter for all axes once by specifying 'ALL_AXES' in 'axis'.
    The parameter for each axis is stored in each array of "IODBPSD".

    The attribute of CNC parameter depends on the type and axis, and it is different for each parameter.
    It is as follows, and can be got by cnc_rdparainfo function.

    Parameter type Meaning Byte size
    Bit parameter Every bits have each definition. 1
    Bit parameter with axis Every bits have each definition. (each axis) 1
    Byte parameter 1-byte data is stored. 1
    Byte parameter with axis 1-byte data is stored. (each axis) 1
    Word parameter 2-byte data is stored. 2
    Word parameter with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real parameter 4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real parameter with axis 4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparam3(unsigned short FlibHndl, short number, short axis, short length, short absolute, IODBPSD *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number.
    It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    length in

    Specify the data block length(size of IODBPSD structure).

    (4+(byte size of parameter)*(number of axis))

    In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes

      n = Maximum controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    absolute in

    Specify whether to acquire by a relative axis or an absolute axis at the parameter read.

    0 : Relative axis
    1 : Absolute axis
    param out

    Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.

    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Parameter number which was read is stored.
    type
    Attribute of parameter which was read is stored.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real parameter is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPSD structure(length) is wrong.
    EW_NUMBER Data number error
    Parameter number(number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.

    ncdata\cnc_rdparam_ext

    Reads the random number parameters. The parameter numbers are specified by the array of long type ("prm_no[]"). And the number of the array is specified by "num".

    The information of parameters is stored to the array of IODBPRM structure. If an invalid parameter number is specified, the type field of the IODBPRM structure is -1. In case of non-axis type parameter, the parameter value is stored to the data[0] of the IODBPRM structure. And, in case of axis-type parameter, the parameter value is stored to the data array of the structure.

    All parameter values are stored to long type. So your application have to cast them according to the type information.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparam_ext(unsigned short FlibHndl, long *prm_no, short num, IODBPRM *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prm_no in

    Specify the pointer to the array of the parameter numbers.

    See the "PARAMETER MANUAL" of CNC about available parameter number.
    It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    num in

    Specify the number of the parameters to be read.

    param out

    Specify the pointer to the array of IODBPRM structure to store the parameters. The number of array must be equal to "num". The IODBPRM structure is as follows.

    typedef struct iodbprm {
            long datano;        /* parameter number */
            short type;         /* type information */
            short axis;         /* axis information */
            short info;         /* attribute */
            short unit;         /* unit */
            struct {
                long prm_val;   /* parameter value */
                long dec_val;   /* place of decimal point */
            } data[32];
    } IODBPRM;
    
    datano
    Parameter number which was read is stored.
    type
    Type information of parameter which was read is stored.
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type ( Series 15i, 30i, 0i-D/F, PMi-A )
    -1 : invalid parameter
    axis
    Axis information of parameter which was read is stored.
    bit 0 : axis attribute
    0 : without axis
    1 : with axis
    bit 1 : spindle parameter
    0 : no spindle
    1 : spindle
    bit 2,..,15 : (reserve)
    info
    Attribute of parameter which was read is stored.
    bit 0 : sign
    0 : with sign
    1 : without sign
    bit 1 : settings input
    0 : disable
    1 : enable
    bit 2 : write protection
    0 : enable
    1 : disable
    bit 3 : power must be off after writing
    0 : not necessary
    1 : necessary
    bit 4 : read protection
    0 : enable
    1 : disable
    bit 5,..,15 : (reserve)
    unit
    Unit of real type parameter which was read is stored.
    bit 0, 1 : attribute
    0 : no real type
    1 : input unit
    2 : output unit
    bit 2,..,4 : unit
    0 : without unit
    1 : unit of length
    2 : unit of angle
    3 : unit of length + angle
    4 : unit of velocity
    bit 5,..,15 : (reserve)
    data
    Value of parameter which was read is stored.
    prm_val : Value of parameter
    dec_val : Place of decimal point (only available for real type)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of parameters (num) is 0 or less.
    EW_PASSWD Specified parameter cannot be read because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_rdparanum

    Reads minimum, maximum, total number of the CNC parameter.

    The distribution of the parameter is different in each CNC model, and the new parameter may be added because of the expansion of the CNC function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparanum(unsigned short FlibHndl, ODBPARANUM *paranum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    paranum out

    Pointer to the ODBPARANUM structure including the minimum, maximum, total number of the parameter. The ODBPARANUM structure is as follows.

    typedef struct odbparanum {
        unsigned short para_min ;  /* minimum number of parameter */
        unsigned short para_max ;  /* maximum number of parameter */
        unsigned short total_no ;  /* total number of parameter */
    } ODBPARANUM ;
    

    ERRORS

    Code Description

    ncdata\cnc_rdparar

    Reads the parameter specified by "*s_number","*e_number","axis"(only for the parameter with axis). The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary.

    Reads the parameter for all axes specified range by specifying 'ALL_AXES' in 'axis'.

    The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is as follows, and can be got by cnc_rdparainfo function.

    Parameter type Meaning Byte size
    Bit parameter Every bits have each definition. 1
    Bit parameter with axis Every bits have each definition. (each axis) 1
    Byte parameter 1-byte data is stored. 1
    Byte parameter with axis 1-byte data is stored. (each axis) 1
    Word parameter 2-byte data is stored. 2
    Word parameter with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real parameter
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real parameter with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are read at the same time.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdparar(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start parameter number.
    The parameter number which was read first actually is returned.

    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    e_number in/out

    Specify the end parameter number.
    The parameter number which was read last actually is returned.

    The new parameter may be added according to updating CNC software, addition of the new function, etc. If the new parameter is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify only the continuous numbers of existing parameters as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)

    None axis type parameter can be read even if any value is specified in "axis". In case that an axis type parameter exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0".

    length in/out

    Specify the data block length which is enough to store the specified parameter.

    The structure per 1 parameter is as follows, and each parameter is lined up in order of number.

    [= 4+(byte size of each parameter)*(number of axis)]

    Because the size which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes

      n = Maximum controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param out

    Pointer to the area to store the parameters.
    Each parameter can be referred by using the IODBPSD structure.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* parameter number */
       short type;                /* upper byte:type */
                                  /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte parameter */
          short idata;            /* word parameter */
          long  ldata;            /* 2-word parameter */
          char  cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
          short idatas[MAX_AXIS]; /* word parameter with axis */
          long  ldatas[MAX_AXIS]; /* 2-word parameter with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Parameter number which was read is stored.
    type
    Attribute of parameter which was read is stored.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type (Series 15i, 30i, 0i-D/F, PMi-A)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Real parameter is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start parameter number.
    The parameter number which was read first actually is returned.

    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    e_number in/out

    Specify the end parameter number.
    The parameter number which was read last actually is returned.

    The new parameter may be added according to updating CNC software, addition of the new function, etc. If the new parameter is added within reading range, the error(Return:EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify only the continuous numbers of existing parameters as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)

    None axis type parameter can be read even if any value is specified in "axis". In case that an axis type parameter exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0".

    length in/out

    Specify the data block length which is enough to store the specified parameter.

    The structure per 1 parameter is as follows, and each parameter is lined up in order of number.

    [= 4+(byte size of each parameter)*(number of axis)]

    Because the size which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param out

    Pointer to the area to store the parameters.
    Each parameter can be referred by using the IODBPSD structure.

    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Parameter number which was read is stored.
    type
    Attribute of parameter which was read is stored.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real parameter is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of area to store parameter(length) is wrong.
    EW_NUMBER Data number error
    Parameter number(s_number,e_number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_PASSWD The parameter of specified range cannot be read because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_rdpitchinfo

    Reads the available number of pitch error compensation data. It is stored in "*use_no" with signed binary format.

    In case of Series 16i/18i-W, the data is stored in the array, use_no[8].


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpitchinfo(unsigned short FlibHndl, short* use_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    use_no out

    Pointer to the available number of pitch error compensation data

    • Series 15/15i
    • 1280

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C/D, Power Mate i
    • Pitch error compensation : 1024 points(0-1023)
      Bi-directional pitch error compensation : 1024 points(An actual number is twice.)(0-1023, 3000-4023)
      Extended bi-directional pitch error compensation : 2560 points(An actual number is twice.)(0-2559, 3000-5559)

    • Series 0i-F, 30i/31i/32i, PMi-A
    • pitch error compensation : 1536 points(0-1535)
      Bi-directional pitch error compensation : 1536 points(An actual number is twice.)(0-1535, 3000-4535)
      Extended bi-directional pitch error compensation : 2560 points(An actual number is twice.)(0-2559, 3000-5559)

    • Series 16i/18i-W
    • (Specify the starting pointer of contiunous 8 words.)
      use_no[0] : number of pitch error compensation data of 1000th
      use_no[1] : number of pitch error compensation data of 2000th
      use_no[2] : number of pitch error compensation data of 3000th
      use_no[3] : number of pitch error compensation data of 4000th
      use_no[4] : number of pitch error compensation data of 5000th
      use_no[5] : number of pitch error compensation data of 6000th
      use_no[6] : number of pitch error compensation data of 7000th
      use_no[7] : number of pitch error compensation data of 8000th
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    use_no out

    Pointer to the available number of pitch error compensation data

    In case of bi-directional pitch error compensation, the available number is twice.


    ERRORS

    Code Description
    EW_NOOPT No option
    This function needs the pitch error compensation option.

    ncdata\cnc_rdpitchr

    Reads the pitch error compensation data specified by "s_number", "e_number". The data is stored in "data" array of "IODBPI" with signed binary format.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C/D, Power Mate i
    • Available range of data : -7,..,7

    • Series 15i, 0i-F, 30i, PMi-A
    • Available range of data : -128,..,127


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpitchr(unsigned short FlibHndl, short s_number, short e_number, short length, IODBPI *pitch);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start number of the pitch error compensation data.

    e_number in

    Specify the end number of the pitch error compensation data.

    length in

    Specify the data block length (size of IODBPI structure).

    6+(number of pitch error compensation data)

    IODBPI

    N : Number of pitch error compensation data

    pitch out

    Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.

    typedef struct  iodbpi {
        short datano_s; /* start number of pitch error data */
        short dummy;    /* (not used) */
        short datano_e; /* end number of pitch error data */
        char  data[N];  /* pitch error compensation data */
    } IODBPI ;          /* N : number of pitch error data */
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPI structure(length) is wrong.
    EW_NUMBER Data number error
    Pitch error compensation data number(s_number, e_number) is wrong.
    EW_NOOPT No option
    This function needs the pitch error compensation option.

    ncdata\cnc_rdpmacro

    Reads the P code macro variable (variable for the macro-executor) specified by "number". The data is stored in "ODBPM" with signed binary format.

    It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type.

    • decimal form floating-point type (data format=M*10**(-E))
    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range:999999999,..,-999999999, integer type:-32768,..,32767)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127, integer type : 0)

      mcr_val always returns by nine digits and adjusts the amount with the value of dec_val.


      Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
      mcr_val = 123450000
      dec_val = 7
    • binary form floating-point type (data format=M*2**(-E))
    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpmacro(unsigned short FlibHndl, long number, ODBPM *pmacro);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range.

    pmacro out

    Pointer to the ODBPM structure including the P code macro variable. The ODBPM structure is as follows.

    typedef struct  odbpm {
        long    datano ;    /* P code macro variable number */
        short   dummy ;     /* (not used) */
        long    mcr_val ;   /* value of P code macro */
        short   dec_val ;   /* number of places of decimals */
    } ODBPM ;
    

    ERRORS

    Code Description
    EW_NUMBER Data number error
    P code macro variable number(number) is wrong.
    EW_NOOPT No option
    This function needs the macro-executor option.
    EW_PASSWD Specified P code macro variable cannot be read because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_rdpmacroinfo

    Reads the available number of the P code macro variables (variable for the macro-executor) and the type of it. Those are stored in "ODBPMINF" with signed binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpmacroinfo(unsigned short FlibHndl, ODBPMINF *pminf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pminf out

    Pointer to the ODBPMINF structure including the P code macro variable information. The ODBPMINF structure is as follows.

    The following parameters are not the CNC parameter, but the compile parameter of the macro-compiler.

    See the "PROGRAMING MANUAL" of the macro-executor for details of the compile parameter.

    Please specify "PCD_UWORD" for "-D" option when compiling, if the number of variables whose number is 40,000 or greater for Series 15, or 20,000 or greater for Series 16/18/21, 16i/18i/21i, 0i, Power Mate i exceeds 32767.

    • Series 15
    • typedef struct odbpminf {
              short   use_no1; /* number of variables(30000,...) */
      #ifdef PCD_UWORD         /* When the number of variables whose number is 40,000
                                  or greater exceeds 32767 */
              unsigned short  use_no2;
                               /* number of variables(40000,...) */
      #else
              short   use_no2; /* number of variables(40000,...) */
      #endif
              short   v2_type1;/* type of variables(30000,...) */
              short   v2_type2;/* type of variables(40000,...) */
      } ODBPMINF;
      
      use_no1
      Number of usable P code macro variables(30000,...)

      use_no2
      Number of usable P code macro variables(40000,...)

      v2_type1
      Type of P code macro variables(30000,...)
      This is always the integer type.
      In case of 'use_no1=0', this is invalid.
      0 : Type A(floating-point type)
      1 : Type B(integer type)

      v2_type2
      Type of P code macro variables(40000,...)
      In case of 'use_no2=0', this is invalid.
      0 : Type A(floating-point type)
      1 : Type B(integer type)

    • Series 16/18/21, 16i/18i/21i, 0i, Power Mate i
    • typedef struct odbpminf {
              short   use_no1; /* number of variables(10000,...) */
      #ifdef PCD_UWORD         /* When the number of variables whose number is 20,000
                                  or greater exceeds 32767 */
              unsigned short  use_no2;
                               /* number of variables(20000,...) */
      #else
              short   use_no2; /* number of variables(20000,...) */
      #endif
              short   v2_type; /* type of variables(20000,...) */
      } ODBPMINF;
      
      use_no1
      Number of usable P code macro variables(10000,...)

      (parameter No.9037 * 100)

      '6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.

      use_no2
      Number of usable P code macro variables(20000,...)
      However, use_no2 becomes the following meanings for Type C/D

      (use_no2(=1,2,4,...) * 65536)

      v2_type
      Type of P code macro variables(20000,...)
      In case of 'use_no2=0', this is invalid.

        0 : Type A(floating-point type)
        1 : Type B(integer type)
        2 : Type C (integer type)/high-speed cycle cutting 1
        (except Series 21, 21i, 0i, Power Mate i)
        3 : Type D (integer type)/high-speed cycle cutting 2
        (except Series 21, 21i, 0i, Power Mate i)

      Type of P code macro variables(10000,...) is always the floating-point type.

    typedef struct odbpminf {
            short   use_no1; /* number of variables(10000,...) */
    #ifdef PCD_UWORD         /* When the number of variables whose number is 20,000
                                or greater exceeds 32767 */
            unsigned short  use_no2;
                             /* number of variables(20000,...) */
    #else
            short   use_no2; /* number of variables(20000,...) */
    #endif
            short   v2_type; /* type of variables(20000,...) */
    } ODBPMINF;
    
    use_no1
    Number of usable P code macro variables(10000,...)

    (parameter No.9037 * 100)

    '6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.

    use_no2
    Number of usable P code macro variables(20000,...)
    However, use_no2 becomes the following meanings for Type C/D

    (use_no2(=1,2,4,...) * 65536)

    v2_type
    Type of P code macro variables(20000,...)
    In case of 'use_no2=0', this is invalid.

      0 : Type A(floating-point type)
      1 : Type B(integer type)

    Type of P code macro variables(10000,...) is always the floating-point type.


    ERRORS

    Code Description
    EW_NOOPT No option
    This function needs the macro-executor option.

    ncdata\cnc_rdpmacroinfo2

    Reads the available number of the P code macro variables (variable for the macro-executor) and the type of it. Those are stored in "ODBPMINF2" with signed binary format.

    When the variable for a conversation macro and a high-speed cycle is coexistent, the information for variable of 20,000 or later cannot be acquired with cnc_rdpmacroinfo. So, please use this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpmacroinfo2(unsigned short FlibHndl, ODBPMINF2 *pminf2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pminf out

    Pointer to the ODBPMINF2 structure including the P code macro variable information. The ODBPMINF2 structure is as follows.

    The following parameters are not the CNC parameter, but the compile parameter of the macro-compiler.

    See the "PROGRAMING MANUAL" of the macro-executor for details of the compile parameter.

    typedef struct odbpminf2 {
        long    use_no1;  /*  number of variables(10000,...)       */
        long    use_no2;  /*  number of variables(20000,...)       */
        long    use_no20; /*  number of high-speed cycle variables */
        short   v1_type;  /*  type of variables(10000,...)         */
        short   v2_type;  /*  type of variables(20000,...)         */
        short   v20_type; /*  type of high-speed cycle variables   */
    } ODBPMINF2;
    
    use_no1
    Number of usable P code macro variables(10000,...)

    '6000' is returned in case of some series/version of CNC control software, but the usable number is acquired as an above value.

    (parameter No.9037 * 100)

    use_no2
    Number of usable P code macro variables(20000,...)
    use_no20
    Number of variables for high-speed cycle. The variable for high-speed cycle indicates the following P code macro variable.
    • Series 16i/18i
    • #20000 - #85535
      #200000 - #986432

    • Series 30i/31i/32i, 0i-D, PMi-A
    • #20000 - #85535
      #200000 - #986432
      #2000000 - #3999999
    v1_type
    Type of P code macro variables(10000,...)
      0 : Type A(floating-point type)
      1 : Type B(integer type)
    In case of 'use_no1 = 0', this is invalid.
    v2_type
    Type of P code macro variables(20000,...)
      0 : Type A(floating-point type)
      1 : Type B(integer type)
      2 : Type C (integer type)/high-speed cycle cutting 1
      3 : Type D (integer type)/high-speed cycle cutting 2
    In case of 'use_no2 = 0', this is invalid.
    v20_type
    Type of P code macro variables for high-speed cycle.
      2 : Type C (integer type)/high-speed cycle cutting 1
      3 : Type D (integer type)/high-speed cycle cutting 2
    In case of 'use_no20 = 0', this is invalid.

    ERRORS

    Code Description
    EW_NOOPT No option
    This function needs the macro-executor option.

    ncdata\cnc_rdpmacror

    Reads the P code macro variables(variable for the macro-executor) specified by "s_number", "e_number". The data is stored in "IODBPR" with signed binary format.

    It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type.

    • decimal form floating-point type (data format=M*10**(-E))

    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range:999999999,..,-999999999, integer type:-32768,..,32767)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127, integer type : 0)

      mcr_val always returns by nine digits and adjusts the amount with the value of dec_val.


      Example: When the variable value is 12.345, mcr_val and dec_val are read as follows.
      mcr_val = 123450000
      dec_val = 7
    • binary form floating-point type (data format=M*2**(-E))

    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpmacror(unsigned short FlibHndl, long s_number, long e_number, unsigned short length, IODBPR *pmacror);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range.

    e_number in

    Specify the end P code macro variable number.

    length in

    Specify the data block length (size of IODBPR structure).

    12+8*(Number of P code macro variable)

    IODBPR

    N : Number of P code macro variable

    pmacror out

    Pointer to the IODBPR structure including the P code macro variable. The IODBPR structure is as follows.

    typedef struct  iodbpr {
        long  datano_s; /* start P code macro variable number*/
        short dummy;    /* (not used) */
        long  datano_e; /* end P code macro variable number */
        struct {
              long  mcr_val; /* value of P code macro */
              short dec_val; /* number of places of decimals */
        } data[N];           /* N:Number of P code macro variable */
    } IODBPR;
    
    datano_s
    The P code macro variable number which was read first is returned.

    datano_e
    The P code macro variable number which was read last is returned.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPR structure(length) is wrong.
    EW_NUMBER Data number error
    P code macro variable number(s_number, e_number) is wrong.
    EW_NOOPT No option
    This function needs the macro-executor option.
    EW_PASSWD The P code macro variable of specified range cannot be read because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_rdpmacror2

    Reads the P code macro variables(variables for the macro-executor) specified by the starting number, "stnum", and number of variables, "*num". The data is stored in "mcval" with double format. It is not influenced by setting of cnc_setpmactype function.

    The value of an undefined variable is called "vacant", and it is expressed as follows.

    0xFFFFFFFFFFFFFFFF

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpmacror2( unsigned short FlibHndl, unsigned long stnum, unsigned long *num, unsigned short type, double *mcval);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stnum in

    Specify the starting P code macro variable number.
    Please refer to the document of the cnc_rdpmacroinfo2 for the range of variable.

    num in

    Specify the number of P code macro variables to be read.
    This function returns the total number of variables that was actually read.

    type in Specify the type of macro variables to be read from followings.
    0 : conversation
    1 : auxiliary
    2 : execution
    * This setting is ignored in case of P code macro variables, 10000,..,89999 and the variables for High-speed cycle cutting.
    mcval out

    Specify the array for read P code macro variables.
    When the variable is "vacant", the 0xFFFFFFFFFFFFFFFF is set.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of P code macro variables(*num) is 0 or less.
    EW_NUMBER Data number error
    P code macro variable number(stnum) is wrong.
    EW_ATTRIB Data attribute error
    Type of P code macro variables(type) is wrong.
    EW_NOOPT No option
    This function needs the macro-executor option.

    ncdata\cnc_rdrotvolc

    Read the 3-dimensional rotary error compensation data by specified range.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrotvolc( unsigned short FlibHndl, long start_no, long *num, IODBROTVOLC *rot_data );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_no in

    Specify the compensation number which the reading start. The range is 1-7812.

    num in/out

    Specify the reading number. The range is 1-13.
    After the execution of this function, *num holds the real read number of data.

    rot_data out

    Pointer to the area to store the 3-dimensional rotary error compensation data.
    The IODBROTVOLC structure is as follows. (Maximum size is rot_data[13].)

    typedef struct iodbrotvolc {
        long   lin[3] ;   /* translational errors[Cx,Cy,Cz]    */
        long   rot[3] ;   /* rotary errors[Cα,Cβ,Cγ] */
    } IODBROTVOLC ;
    

    It is necessary to allocate the size of [num * sizeof(iodbrotvolc)] byte for "rot_data".


    For example, when 2 data from No.5 is acquired, the acquired data becomes as follows.


    ODBROTVOLC *rot_data ;


    start_no = 5;

    num = 2;


    The 3-dimensional rotary error compensation data is stored as follows.


    rot_data[0]->lin[0] Translational error compensation data of 1st axis in No.5.

    rot_data[0]->lin[1] Translational error compensation data of 2nd axis in No.5.

    rot_data[0]->lin[2] Translational error compensation data of 3rd axis in No.5.

    rot_data[0]->rot[0] Rotary error compensation data of 1st axis in No.5.

    rot_data[0]->rot[1] Rotary error compensation data of 2nd axis in No.5.

    rot_data[0]->rot[2] Rotary error compensation data of 3rd axis in No.5.

    rot_data[1]->lin[0] Translational error compensation data of 1st axis in No.6.

    rot_data[1]->lin[1] Translational error compensation data of 2nd axis in No.6.

    rot_data[1]->lin[2] Translational error compensation data of 3rd axis in No.6.

    rot_data[1]->rot[0] Rotary error compensation data of 1st axis in No.6.

    rot_data[1]->rot[1] Rotary error compensation data of 2nd axis in No.6.

    rot_data[1]->rot[2] Rotary error compensation data of 3rd axis in No.6.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Reading start compensation number(start_no) is wrong.
    5 : Reading number(num) is wrong.
    EW_NOOPT No option
    This function needs the 3-dimensional rotary error compensation and the extended driver/library function option.

    ncdata\cnc_rdrstrmcode

    Reads specified number of executing or executed M codes, starting from the M code group with specified number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdrstrmcode(unsigned short FlibHndl, short s_no, short *num, ODBRSTRM *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify M code group number.

    num in / out

    Pointer to the number of M code groups to be read.
    Specify the number of M code groups to be read before function call and actual number of M code groups being read is stored after the function call.

    buf out

    Pointer to the ODBRSTRM structure where returned data are stored. The ODBRSTRM structure is as follows.

    typedef struct odbrstrm {
            short   grp_no;
            short   mem_no;
            struct{
                    long    no;
                    short   flag;
            }m_code[5];
    } ODBRSTRM;
    
    grp_no
    M code group number
    M code group number is returned.

    mem_no
    The number of the M codes memorized.
    The number of the M codes memorized in the group is returned.

    m_code[N].no
    M code
    The latest five M codes in the group are returned. (N: 0,..,4)

    m_code[N].flag
    Executed / Executing / Program restart flag
    Flags to indicate whether above M codes in m_code[N].no are executed, executing or specified during Program restart operation.
    0 : executed
    1 : executing
    2 : specified during Program restart operation
    Executed / Executing / Program restart flags for latest five M codes in the group are returned. (N: 0,..,4)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number indication(num) is wrong.
    EW_NUMBER Data number error
    The start number(s_no) is wrong.
    EW_NOOPT No option
    The M code group option, the program restart option and the extended driver/library function are necessary.

    ncdata\cnc_rdset

    Reads the setting data specified by "number","axis"(only for the setting data with axis). The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary.

    Reads the setting data for all axes once by specifying 'ALL_AXES' in 'axis'. The setting data for each axis is stored in each array of "IODBPSD".

    The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function.

    Setting data type Meaning Byte size
    Bit setting data Every bits have each definition. 1
    Bit setting data with axis Every bits have each definition. (each axis) 1
    Byte setting data 1-byte data is stored. 1
    Byte setting data with axis 1-byte data is stored. (each axis) 1
    Word setting data 2-byte data is stored. 2
    Word setting data with axis 2-byte data is stored. (each axis) 2
    2-Word setting data 4-byte data is stored. 4
    2-Word setting data with axis 4-byte data is stored. (each axis) 4
    Real setting data
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real setting data with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are read at the same time.

    This function is the same as cnc_rdparam function except that it cannot read the parameter without setting attribute.

    See the "PARAMETER MANUAL" of CNC for details of each setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdset(unsigned short FlibHndl, short number, short axis, short length, IODBPSD *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of setting data)*(number of axis)

    In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set out

    Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* setting data number */
       short type;                /* upper byte:type */
                                  /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte setting data */
          short idata;            /* word setting data */
          long  ldata;            /* 2-word setting data */
          char  cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
          short idatas[MAX_AXIS]; /* word setting data with axis */
          long  ldatas[MAX_AXIS]; /* 2-word set. data with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real setteing data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Setting data number which was read is stored.
    type
    Attribute of setting data which was read is stored.
    Upper byte:type(only Series 15/15i)
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type (only Series 15i)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Real setting data is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of setting data)*(number of axis)

    In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set out

    Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.

    typedef struct realprm {     /* real setteing data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Setting data number which was read is stored.
    type
    Attribute of setting data which was read is stored.
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real setting data is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPSD structure(length) is wrong.
    EW_NUMBER Data number error
    Setting data number(number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.

    ncdata\cnc_rdsetinfo

    Reads the CNC setting data information specified by "s_number" and "read_no".

    The CNC setting data is basically non-continuous, and the attribute like the type and the size, etc. is different at each number. Use this function for the purpose such as displaying the setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsetinfo(unsigned short FlibHndl, short s_number, unsigned short read_no, ODBSETIF *setif);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start setting data number.

    read_no in

    Specify the number of the setting data information to be read.

    setif out

    Pointer to the ODBSETIF structure including the setting data information. The ODBSETIF structure is as follows.

    typedef struct odbsetif {
        unsigned short info_no ;  /* number of setting data information */
        short       prev_no ;         /* previous setting data number */
        short       next_no ;         /* next setting data number */
        struct {
            short   set_no ;          /* setting data number */
            short   set_type ;        /* attribute of setting data */
        } info[N] ;     /* N is number of setting data information */
    } ODBSETIF ;
    
    info_no
    Number of setting data information
    Number of the setting data information which has been read actually.
    prev_no
    Previous setting data number
    Previous effective number of the setting data information which has been read first.
    next_no
    Next setting data number
    Next effective number of the setting data information which has been read last.
    info[N].set_no
    Setting data number
    The setting data number which exists actually.
    info[N].set_type
    Attribute of setting data
    The following attributes are set.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • bit 0, 1 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : sign ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
      0 : with sign
      1 : without sign
      bit 4 : settings input
      (always)1 : enable
      bit 5 : write protection
      (always)0 : enable
      bit 6 : power must be off after writing
      (always)0 : disable
      bit 7 : read protection
      0 : enable
      1 : disable
      bit 8 : spindle parameter ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
      0 : no spindle
      1 : spindle
      bit 9,..,15 : (reserve)

    • Series 15i
    • bit 0, 1 : (reserve)
      bit 2 : axis attribute
      0 : without axis
      1 : with axis
      bit 3 : (reserve)
      bit 4 : settings input
      (always) 1 : enable
      bit 5 : write protection
      (always) 0 : enable
      bit 6 : power must be off after writing
      (always) 0 : disable
      bit 7 : read protection
      0 : enable
      1 : disable
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      bit 12,..,15 : (reserve)

    • Series 30i, 0i-D/F, PMi-A
    • bit 0, 1 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type or real type
      bit 2 : array type attribute
      0 : except array type
      1 : array type
      bit 3 : sign
      0 : with sign
      1 : without sign
      bit 4 : settings input
      (always) 1 : enable
      bit 5 : write protection
      (always) 0 : enable
      bit 6 : power must be off after writing
      (always) 0 : disable
      bit 7 : read protection
      (always)0 : enable
      bit 8 : spindle parameter
      0 : no spindle
      1 : spindle
      bit 9,..,11 : (reserve)
      bit 12 : in case of type attribute = 3
      0 : except real type
      1 : real type
      bit 13,..,15 : (reserve)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start setting data number.

    read_no in

    Specify the number of the setting data information to be read.

    setif out

    Pointer to the ODBSETIF structure including the setting data information. The ODBSETIF structure is as follows.

    typedef struct odbsetif {
        unsigned short info_no ;  /* number of setting data information */
        short       prev_no ;         /* previous setting data number */
        short       next_no ;         /* next setting data number */
        struct {
            short   set_no ;          /* setting data number */
            short   set_type ;        /* attribute of setting data */
        } info[N] ;     /* N is number of setting data information */
    } ODBSETIF ;
    
    info_no
    Number of setting data information
    Number of the setting data information which has been read actually.
    prev_no
    Previous setting data number
    Previous effective number of the setting data information which has been read first.
    next_no
    Next setting data number
    Next effective number of the setting data information which has been read last.
    info[N].set_no
    Setting data number
    The setting data number which exists actually.
    info[N].set_type
    Attribute of setting data
    The following attributes are set.
    bit 0, 1 : type attribute
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type or real type
    bit 2 : array type attribute
    0 : except array type
    1 : array type
    bit 3 : sign
    0 : with sign
    1 : without sign
    bit 4 : settings input
    (always) 1 : enable
    bit 5 : write protection
    (always) 0 : enable
    bit 6 : power must be off after writing
    (always) 0 : disable
    bit 7 : read protection
    (always)0 : enable
    bit 8 : spindle parameter
    0 : no spindle
    1 : spindle
    bit 9,..,11 : (reserve)
    bit 12 : in case of type attribute = 3
    0 : except real type
    1 : real type
    bit 13,..,15 : (reserve)

    ERRORS

    Code Description
    EW_NUMBER Data number error
    Start setting data number (s_number) is wrong.

    ncdata\cnc_rdsetnum

    Reads minimum, maximum, total number of the CNC setting data.

    The distribution of the setting data is different in each CNC model, and the new setting data may be added because of the expansion of the CNC function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsetnum(unsigned short FlibHndl, ODBSETNUM *setnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    setnum out

    Pointer to the ODBSETNUM structure including the minimum, maximum, total number of the setting data. The ODBSETNUM structure is as follows.

    typedef struct odbsetnum {
        unsigned short set_min ;  /* minimum number of setting data */
        unsigned short set_max ;  /* maximum number of setting data */
        unsigned short total_no ; /* total number of setting data */
    } ODBSETNUM ;
    

    ERRORS

    Code Description

    ncdata\cnc_rdsetr

    Reads the setting data specified by "s_number","e_number","axis"(only for the setting data with axis). The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary.

    Reads the setting data for all axes specified range by specifying 'ALL_AXES' in 'axis'.

    The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function.

    Setting data type Meaning Byte size
    Bit setting data Every bits have each definition. 1
    Bit setting data with axis Every bits have each definition. (each axis) 1
    Byte setting data 1-byte data is stored. 1
    Byte setting data with axis 1-byte data is stored. (each axis) 1
    Word setting data 2-byte data is stored. 2
    Word setting data with axis 2-byte data is stored. (each axis) 2
    2-Word setting data 4-byte data is stored. 4
    2-Word setting data with axis 4-byte data is stored. (each axis) 4
    Real setting data
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real setting data with axis
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to read any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are read at the same time.

    This function is the same as cnc_rdparar function except that it cannot read the parameter without setting attribute.

    See the "PARAMETER MANUAL" of CNC for details of each setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsetr(unsigned short FlibHndl, short *s_number, short axis, short *e_number, short *length, void *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start setting data number. The setting data number which was read first is returned.

    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    e_number in/out

    Specify the end setting data number.
    The setting data number which was read last is returned.

    The new setting data may be added according to updating CNC software, addition of the new function, etc. If the new setting data is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing setting data as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)

    None axis type setting data can be read even if any value is specified in "axis". In case that an axis type setting data exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0".

    length in/out

    Specify the data block length which is enough to store the specified setting data.

    The structure per 1 setting data is as follows, and each setting data is lined up in order of number.

    [= Sum of (4+(byte size of each setting data) *(number of axis))]

    Because the size which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes

      n = Maximum controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set out

    Pointer to the area to store the setting data.
    Each setting data can be referred by using the IODBPSD structure.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* setting data number */
       short type;                /* upper byte:type */
                                  /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte setting data */
          short idata;            /* word setting data */
          long  ldata;            /* 2-word setting data */
          char  cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
          short idatas[MAX_AXIS]; /* word setting data with axis*/
          long  ldatas[MAX_AXIS]; /* 2-word set. data with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Setting data number which was read is stored.
    type
    Attribute of setting data which was read is stored.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type (only Series 15i, 30i, 0i-D/F, PMi-A)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Real setting data is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in/out

    Specify the start setting data number. The setting data number which was read first is returned.

    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    e_number in/out

    Specify the end setting data number.
    The setting data number which was read last is returned.

    The new setting data may be added according to updating CNC software, addition of the new function, etc. If the new setting data is added within reading range, the error(Return: EW_LENGTH) may be returned or the application program may not work correctly. In order to avoid these problems, specify the continuous numbers of existing setting data as the reading range.

    axis in

    Specify the axis number.

    0 : assigns no axis
    1,..,m : assigns 1 axis(m=max. controlled axes)
    ALL_AXES : assigns all axes(ALL_AXES=-1)

    None axis type setting data can be read even if any value is specified in "axis". In case that an axis type setting data exists in the specified range, the error(Return:EW_ATTRIB) is returned by specifying "axis=0".

    length in/out

    Specify the data block length which is enough to store the specified setting data.

    The structure per 1 setting data is as follows, and each setting data is lined up in order of number.

    [= Sum of (4+(byte size of each setting data) *(number of axis))]

    Because the size which was read actually is returned, it is possible to specify the length more than the actual size.

    In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set out

    Pointer to the area to store the setting data.
    Each setting data can be referred by using the IODBPSD structure.

    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Setting data number which was read is stored.
    type
    Attribute of setting data which was read is stored.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)
    rdata, rdatas
    Real setting data is stored.
    The value of variable is stored in prm_val, and the number of places of decimals is stored in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of area to store setting data(length) is wrong.
    EW_NUMBER Data number error
    Setting data number(s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.

    ncdata\cnc_rdtofs

    Reads the tool offset value specified by "number", "type". The offset value is stored in "data" of "ODBTOFS" with signed binary format.

    The unit of offset value is as follows.

    • Series 15
    • 6007#0
      (ONM)
      6004#0
      (OUF)
      6002#1
      (OFN)
      6002#0
      (ORG)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001

    • Series 15i
    • 6007#0
      (OFE)
      6004#0
      (OFD)
      6002#1
      (OFC)
      6002#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001
      IS-A is effective for Power Mate i-H.
      IS-C is effective for Power Mate i-D.

    • Series 0i-D/F, PMi-A
    • 5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 1 0.01 0.001 0.01
      0 0 0.001 0.0001 0.001
      1 0 0.0001 0.00001 0.0001

    • Series 30i
    • 5042#3
      (OFE)
      5042#2
      (OFD)
      5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtofs(unsigned short FlibHndl, short number, short type, short length, ODBTOFS *tofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool offset number.
    The available number of tool offset can be got by cnc_rdtofsinfo function.

    type in

    Specify the tool offset type.(see the following table)

    • Machining Center Series (M series, including Power Mate i, PMi-A)
    • Cutter radius Tool length
      Wear 0 2
      Geometry 1 3
      Specify "cutter radius" in case of no distinction of cutter radius/tool length, and "wear" in case of no distinction of wear/geometry.

    • Machining Center Series (M series, Series 30i)
    • Cutter radius Tool length Imaginary tool nose Corner R
      Wear 0 2 6 10
      Geometry 1 3 7 11
      Specify "cutter radius" in case of no distinction of cutter radius/tool length, and "wear" in case of no distinction of wear/geometry.

    • Lathe Series (T series)
    • X axis Z axis Nose R Imaginary tool nose Y axis 4th axis 5th axis
      Wear 0 2 4 6 8 30 32
      Geometry 1 3 5 7 9 31 33
      2nd coord Ware(Series 30i) 15 17 19 21 23 -- --
      2nd coord Geometry(Series 30i) 16 18 20 22 24 -- --
      Specify "wear" in case of no distinction of wear/geometry.

    • Lathe Series (T series, second geometry offset, Series 30i)
    • X axis Z axis Y axis
      Geometry 100 101 102
      2nd coord Geometry 110 111 112

      When Tool offset for Milling and Turning function option is effective, specify the following type.(Series 30i)
    • Machining Center Series
    • X axis Tool length Cutter radius Imaginary tool nose Y axis Corner R
      Wear 0 2 4 6 8 10
      Geometry 1 3 5 7 9 11

    • Lathe Series (T series)
    • X axis Z axis Nose R Imaginary tool nose Y axis
      Wear 0 2 4 6 8
      Geometry 1 3 5 7 9
      Tool offset for Milling and Turning function and the changing active offset value with manual move function can not specify at same time. So, the wear and geometry offset for 2nd coordinate are not exist.

    • Lathe Series/second geometry offset
    • X axis Z axis Y axis
      Geometry 100 101 102
      Tool offset for Milling and Turning function and the changing active offset value with manual move function can not specify at same time. So, the geometry offset for 2nd coordinate are not exist.

    length in

    Specify the data block length(size of ODBTOFS structure=8).

    tofs out

    Pointer to the ODBTOFS structure including the tool offset value. The ODBTOFS structure is as follows.

    typedef struct odbtofs {
        short   datano ; /* offset number */
        short   type ;   /* offset type */
        long    data ;   /* offset value */
    } ODBTOFS ;
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ODBTOFS structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(number) is wrong.
    EW_ATTRIB Data attribute error
    Offset type(type) is wrong.

    ncdata\cnc_rdtofsinfo

    Reads the memory type of tool offset, and the available number of it. Those are stored in "ofs_type" and "use_no" of "ODBTLINF" with signed binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtofsinfo(unsigned short FlibHndl, ODBTLINF *tlinf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tlinf out

    Pointer to the ODBTLINF structure for the tool offset information. The ODBTLINF structure is as follows.

    typedef struct odbtlinf {
        short    ofs_type;    /* memory type */
        short    use_no;      /* available number */
    } ODBTLINF ;
    
    ofs_type
    Memory type of tool offset
      0 : memory type A
      1 : memory type B
      2 : memory type C (except T series)
    • Lathe Series(30i/31i/32i, 0i-D/F)
    • 0 : tool offset Memory A
      1 : tool offset Memory B
    When the tool offset for milling and turning function is valid, "10" is always read.(30i/31i/32i)
    use_no
    Available number of tool offset
    • Series 15
    • M Number of offset 32/99/200/499/999 sets
      * In case of the extended tool offset value, the number of offset is half of the above sets.
      T Number of offset 32/64/160 sets
      * In case of the extended tool offset value, the number of offset is half of the above sets.
      TT Number of offset 16/32/80 sets (each path)

    • Series 15i
    • M Number of offset 32/99/200/499/999 sets

    • Series 16/18/21, 16i/18i/21i, 0i
    • M Number of offset 32/64/99/200/400/499/999 sets
      T Number of offset 16/32/64/99 sets

    • Series 30i
    • Number of offset 0 to 999 sets

    • Power Mate i
    • Number of offset 32/64/99/200/400/499/999 sets

    • Power Motion i
    • Number of offset 32/99/200 sets

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tlinf out

    Pointer to the ODBTLINF structure for the tool offset information. The ODBTLINF structure is as follows.

    typedef struct odbtlinf {
        short    ofs_type;    /* memory type */
        short    use_no;      /* available number */
    } ODBTLINF ;
    
    ofs_type
    Memory type of tool offset
    • Machining Center Series
    • 0 : memory type A
      1 : memory type B
      2 : memory type C (except T series)
    • Lathe Series
    • 0 : tool offset Memory A
      1 : tool offset Memory B
    use_no
    Available number of tool offset
    Number of offset(0 to 999 sets)

    ERRORS

    Code Description

    ncdata\cnc_rdtofsinfo2

    Reads the memory type of tool offset, the available number of it and available type of tool offset.
    Those are stored in "ofs_type", "use_no" and "ofs_enable" of "ODBTLINF2" with signed binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtofsinfo2(unsigned short FlibHndl, ODBTLINF2 *tlinf2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tlinf2 out

    Pointer to the ODBTLINF2 structure for the tool offset information. The ODBTLINF2 structure is as follows.

    typedef struct  odbtlinf2 {
        short   ofs_type;       /* memory type */
        short   use_no;         /* available number */
        short   ofs_enable ;    /* available type of tool offset */
    } ODBTLINF2 ;
    
    ofs_type
    Memory type of tool offset
    When the tool offset for milling and turning function is valid, "10" is always read.
      M series (Tool Offset(for Machining Center System) is valid.)
      0 : memory type A
      1 : memory type B
      2 : memory type C

      T series or M series(Tool Offset(for Machining Center System) is invalid.)
      0 : without tool geometry/wear compensation
      1 : with tool geometry/wear compensation

    use_no
    Available number of tool offset

    32/64/99/200/400/499/999/2000 sets


    ofs_enable
    Available type of tool offset

      Bit 0 : X-axis offset availableness=1/invalidation=0
      Bit 1 : Y-axis offset availableness=1/invalidation=0
      Bit 2 : Z-axis offset availableness=1/invalidation=0
      Bit 3 : Nose radius offset availableness=1/invalidation=0
      Bit 4 : imaginary tool nose availableness=1/invalidation=0
      Bit 5 : Second geometry offset availableness=1/invalidation=0
      Bit 5 : Corner R availableness=1/invalidation=0
      Bit 7 : No.4 axis offset availableness=1/invalidation=0
      Bit 8 : No.5 axis offset availableness=1/invalidation=0
      Bit 9,..,15 : (not used)


    ERRORS

    Code Description
    EW_NOOPT No option

    ncdata\cnc_rdtofsr

    Reads the tool offset value specified by "s_number","e_number","type". The offset value is stored in "IODBTO" with signed binary format.

    The unit of offset value is the same as "Read tool offset value(cnc_rdtofs)". See the description of cnc_rdtofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtofsr(unsigned short FlibHndl, short s_number, short type, short e_number, short length, IODBTO *tofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start tool offset number.
    The available number of tool offset can be got by cnc_rdtofsinfo function.

    e_number in

    Specify the end tool offset number.

    type in

    Specify the tool offset type.(see the following table)

    length in

    Specify the data block length.(see the following table)

    tofsr out

    Pointer to the IODBTO structure including the tool offset value.
    The IODBTO structure is as follows.

    typedef struct iodbto {
        short datano_s;             /* start offset number */
        short type;                 /* offset type */
        short datano_e;             /* end offset number */
        union {
            long    m_ofs[N];       /* M series individual */
            long    m_ofs_a[N];     /* M series Memory A all */
            long    m_ofs_b[2*N];   /* M series Memory B all */
            long    m_ofs_c[4*N];   /* M series Memory C all */
            struct  {
                short   tip ;
                long    data[1] ;
            } m_ofs_at[N] ;         /* M series Memory A all with direction of imaginary tool nose */
            struct  {
                short   tip ;
                long    data[2] ;
            } m_ofs_bt[N] ;         /* M series Memory B all with direction of imaginary tool nose */
            struct  {
                short   tip ;
                long    data[4] ;
            } m_ofs_ct[N] ;         /* M series Memory C all with direction of imaginary tool nose */
            short   t_tip[N];       /* T series individual,direction of imaginary tool nose */
            long    t_ofs[N];       /* T series individual */
            struct  {
                short   tip;
                long    data[4];
            } t_ofs_a[N];           /* T series Memory A all */
            struct {
                short   tip;
                long    data[8];
            } t_ofs_b[N];           /* T series Memory B all */
            long    t_ofs_2g[3*N];  /* T series Second geometry all */
            long    m_ofs_cnr[10];  /* M-CornerR */
            struct  {
                long    data[2];
            } t_ofs_ex[N];          /* T series 4th/5th Axis Offset Function all */
        } u ;
    } IODBTO ;      /* N is number of the offset value. */
    

    The combinations of the value specified in "type", the data block length "length", the kind of offset value to be read and the member in which the result is stored are as follows.

    • Machining Series(including Power Mate i, PMi-A)/Tool offset Memory A
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool offset tofsr.u.m_ofs[i]
      -1 8+4*N all Tool offset tofsr.u.m_ofs_a[i]

    • Machining Series(Series 30i)/Tool offset Memory A
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool offset tofsr.u.m_ofs[i]
      9 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      -1 8+4*N all Tool offset tofsr.u.m_ofs_a[i]
      -4 8+8*N all Direction of imaginary tool nose tofsr.u.m_ofs_at[i].tip
      Tool offset tofsr.u.m_ofs_at[i].data[0]

    • Machining Series (including Power Mate i)/Tool offset Memory B
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool geometry offset tofsr.u.m_ofs[i]
      1 8+4*N individual Tool wear offset tofsr.u.m_ofs[i]
      -2 8+8*N all Tool geometry offset tofsr.u.m_ofs_b[2*i+0]
      Tool wear offset tofsr.u.m_ofs_b[2*i+1]

    • Machining Series(Series 30i)/Tool offset Memory B
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool geometry offset tofsr.u.m_ofs[i]
      1 8+4*N individual Tool wear offset tofsr.u.m_ofs[i]
      9 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      -2 8+8*N all Tool geometry offset tofsr.u.m_ofs_b[2*i+0]
      Tool wear offset tofsr.u.m_ofs_b[2*i+1]
      -5 8+12*N all Direction of imaginary tool nose tofsr.u.m_ofs_bt[i].tip
      Tool geometry offset tofsr.u.m_ofs_bt[i].data[0]
      Tool wear offset tofsr.u.m_ofs_bt[i].data[1]

    • Machining Series (including Power Mate i)/Tool offset Memory C
    • type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool length/geometry tofsr.u.m_ofs[i]
      1 8+4*N individual Tool length/wear tofsr.u.m_ofs[i]
      2 8+4*N individual Cutter radius/geometry tofsr.u.m_ofs[i]
      3 8+4*N individual Cutter radius/wear tofsr.u.m_ofs[i]
      -3 8+16*N all Tool length/geometry tofsr.u.m_ofs_c[4*i+0]
      Tool length/wear tofsr.u.m_ofs_c[4*i+1]
      Cutter radius/geometry tofsr.u.m_ofs_c[4*i+2]
      Cutter radius/wear tofsr.u.m_ofs_c[4*i+3]

    • Machining Series(Series 30i)/Tool offset Memory C
    • ・ When the tool offset for milling and turning function option is invalid.
      type length Attribute Offset type Member to be stored in
      0 8+4*N individual Tool length/geometry tofsr.u.m_ofs[i]
      1 8+4*N individual Tool length/wear tofsr.u.m_ofs[i]
      2 8+4*N individual Cutter radius/geometry tofsr.u.m_ofs[i]
      3 8+4*N individual Cutter radius/wear tofsr.u.m_ofs[i]
      9 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      -3 8+16*N all Tool length/geometry tofsr.u.m_ofs_c[4*i+0]
      Tool length/wear tofsr.u.m_ofs_c[4*i+1]
      Cutter radius/geometry tofsr.u.m_ofs_c[4*i+2]
      Cutter radius/wear tofsr.u.m_ofs_c[4*i+3]
      -6 8+20*N all Direction of imaginary tool nose tofsr.u.m_ofs_ct[i].tip
      Tool length/geometry tofsr.u.m_ofs_ct[i].data[0]
      Tool length/wear tofsr.u.m_ofs_ct[i].data[1]
      Cutter radius/geometry tofsr.u.m_ofs_ct[i].data[2]
      Cutter radius/wear tofsr.u.m_ofs_ct[i].data[3]

      ・ When the tool offset for milling and turning function option is valid.
      type length Attribute Offset type Member to be stored in
      0 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      1 8+4*N individual X-axis geometry offset tofsr.u.t_ofs[i]
      2 8+4*N individual Y-axis geometry offset tofsr.u.t_ofs[i]
      3 8+4*N individual Tool length/geometry tofsr.u.t_ofs[i]
      4 8+4*N individual Cutter radius/geometry tofsr.u.t_ofs[i]
      5 8+4*N individual X-axis wear offset tofsr.u.t_ofs[i]
      6 8+4*N individual Y-axis wear offset tofsr.u.t_ofs[i]
      7 8+4*N individual Tool length/wear tofsr.u.t_ofs[i]
      8 8+4*N individual Cutter radius/wear tofsr.u.t_ofs[i]
      -2 8+36*N all Direction of imaginary tool nose tofsr.u.t_ofs_b[i].tip
      X-axis geometry offset tofsr.u.t_ofs_b[i].data[0]
      Y-axis geometry offset tofsr.u.t_ofs_b[i].data[1]
      Tool length/geometry tofsr.u.t_ofs_b[i].data[2]
      Cutter radius/geometry tofsr.u.t_ofs_b[i].data[3]
      X-axis wear offset tofsr.u.t_ofs_b[i].data[4]
      Y-axis wear offset tofsr.u.t_ofs_b[i].data[5]
      Tool length/wear tofsr.u.t_ofs_b[i].data[6]
      Cutter radius/wear tofsr.u.t_ofs_b[i].data[7]

    • Lathe Series/Tool offset Memory A
    • type length Attribute Offset type Member to be stored in
      0 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      1 8+4*N individual X-axis offset tofsr.u.t_ofs[i]
      2 8+4*N individual Y-axis offset tofsr.u.t_ofs[i]
      3 8+4*N individual Z-axis offset tofsr.u.t_ofs[i]
      4 8+4*N individual Nose radius offset tofsr.u.t_ofs[i]
      -1 8+20*N all Direction of imaginary tool nose tofsr.u.t_ofs_a[i].tip
      X-axis offset tofsr.u.t_ofs_a[i].data[0]
      Y-axis offset tofsr.u.t_ofs_a[i].data[1]
      Z-axis offset tofsr.u.t_ofs_a[i].data[2]
      Nose radius offset tofsr.u.t_ofs_a[i].data[3]

    • Lathe Series(Series 30i)/Tool offset Memory B
    • type length Attribute Offset type Member to be stored in
      0 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      1 8+4*N individual X-axis geometry offset tofsr.u.t_ofs[i]
      2 8+4*N individual Y-axis geometry offset tofsr.u.t_ofs[i]
      3 8+4*N individual Z-axis geometry offset tofsr.u.t_ofs[i]
      4 8+4*N individual Nose radius geometry offset tofsr.u.t_ofs[i]
      5 8+4*N individual X-axis wear offset tofsr.u.t_ofs[i]
      6 8+4*N individual Y-axis wear offset tofsr.u.t_ofs[i]
      7 8+4*N individual Z-axis wear offset tofsr.u.t_ofs[i]
      8 8+4*N individual Nose radius wear offset tofsr.u.t_ofs[i]
      -2 8+36*N all Direction of imaginary tool nose tofsr.u.t_ofs_b[i].tip
      X-axis geometry offset tofsr.u.t_ofs_b[i].data[0]
      Y-axis geometry offset tofsr.u.t_ofs_b[i].data[1]
      Z-axis geometry offset tofsr.u.t_ofs_b[i].data[2]
      Nose radius geometry offset tofsr.u.t_ofs_b[i].data[3]
      X-axis wear offset tofsr.u.t_ofs_b[i].data[4]
      Y-axis wear offset tofsr.u.t_ofs_b[i].data[5]
      Z-axis wear offset tofsr.u.t_ofs_b[i].data[6]
      Nose radius wear offset tofsr.u.t_ofs_b[i].data[7]

    • Lathe Series/Second geometry
    • type length Attribute Offset type Member to be stored in
      100 8+4*N individual X-axis offset tofsr.u.t_ofs[i]
      101 8+4*N individual Y-axis offset tofsr.u.t_ofs[i]
      102 8+4*N individual Z-axis offset tofsr.u.t_ofs[i]
      -100 8+12*N all X-axis offset tofsr.u.t_ofs_2g[3*i+0]
      Y-axis offset tofsr.u.t_ofs_2g[3*i+1]
      Z-axis offset tofsr.u.t_ofs_2g[3*i+2]

    • Machining Series(Series 30i)/Corner R
    • type length Attribute Offset type Member to be stored in
      10 8+4*N individual Corner R/geometry tofsr.u.m_ofs[i]
      11 8+4*N individual Corner R/wear tofsr.u.m_ofs[i]
      -10 8+8*N all Corner R/geometry tofsr.u.m_ofs_cnr[2*i+0]
      Corner R/wear tofsr.u.m_ofs_cnr[2*i+1]

    • Lathe Series(Series 30i)/Without Geometory/wear offset(2nd coordinate)
    • type length Attribute Offset type Member to be stored in
      20 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      21 8+4*N individual X-axis offset tofsr.u.t_ofs[i]
      22 8+4*N individual Y-axis offset tofsr.u.t_ofs[i]
      23 8+4*N individual Z-axis offset tofsr.u.t_ofs[i]
      24 8+4*N individual Nose radius offset tofsr.u.t_ofs[i]
      -21 8+20*N all Direction of imaginary tool nose tofsr.u.t_ofs_a2[i].tip
      X-axis offset tofsr.u.t_ofs_a2[i].data[0]
      Y-axis offset tofsr.u.t_ofs_a2[i].data[1]
      Z-axis offset tofsr.u.t_ofs_a2[i].data[2]
      Nose radius offset tofsr.u.t_ofs_a2[i].data[3]

    • Lathe Series(Series 30i)/Geometry/ware offset(2nd coordinate)
    • type length Attribute Offset type Member to be stored in
      20 8+2*N individual Direction of imaginary tool nose tofsr.u.t_tip[i]
      21 8+4*N individual X-axis geometry offset tofsr.u.t_ofs[i]
      22 8+4*N individual Y-axis geometry offset tofsr.u.t_ofs[i]
      23 8+4*N individual Z-axis geometry offset tofsr.u.t_ofs[i]
      24 8+4*N individual Nose radius geometry offset tofsr.u.t_ofs[i]
      25 8+4*N individual X-axis wear offset tofsr.u.t_ofs[i]
      26 8+4*N individual Y-axis wear offset tofsr.u.t_ofs[i]
      27 8+4*N individual Z-axis wear offset tofsr.u.t_ofs[i]
      28 8+4*N individual Nose radius wear offset tofsr.u.t_ofs[i]
      -22 8+36*N all Direction of imaginary tool nose tofsr.u.t_ofs_b2[i].tip
      X-axis geometry offset tofsr.u.t_ofs_b2[i].data[0]
      Y-axis geometry offset tofsr.u.t_ofs_b2[i].data[1]
      Z-axis geometry offset tofsr.u.t_ofs_b2[i].data[2]
      Nose radius geometry offset tofsr.u.t_ofs_b2[i].data[3]
      X-axis wear offset tofsr.u.t_ofs_b2[i].data[4]
      Y-axis wear offset tofsr.u.t_ofs_b2[i].data[5]
      Z-axis wear offset tofsr.u.t_ofs_b2[i].data[6]
      Nose radius wear offset tofsr.u.t_ofs_b2[i].data[7]

    • Lathe Series(Series 30i)/Second geometry(2nd Coordinate)
    • type length Attribute Offset type Member to be stored in
      120 8+4*N individual X-axis offset tofsr.u.t_ofs[i]
      121 8+4*N individual Y-axis offset tofsr.u.t_ofs[i]
      122 8+4*N individual Z-axis offset tofsr.u.t_ofs[i]
      -120 8+12*N all X-axis offset tofsr.u.t_ofs_2g2[3*i+0]
      Y-axis offset tofsr.u.t_ofs_2g2[3*i+1]
      Z-axis offset tofsr.u.t_ofs_2g2[3*i+2]

    • Lathe Series(Series 30i)/4th/5th Axis Offset Function/Without Geometory/wear offset
    • type length Attribute Offset type Member to be stored in
      12 8+4*N individual 4th axis offset tofsr.u.t_ofs[i]
      14 8+4*N individual 5th axis offset tofsr.u.t_ofs[i]
      -12 8+4*N all 4th axis offset tofsr.u.t_ofs_ex[i].data[0]
      -14 8+4*N all 5th axis offset tofsr.u.t_ofs_ex[i].data[0]

    • Lathe Series(Series 30i)/4th/5th Axis Offset Function/Geometory/wear offset
    • type length Attribute Offset type Member to be stored in
      12 8+4*N individual 4th axis geometory offset tofsr.u.t_ofs[i]
      13 8+4*N individual 4th axis wear offset tofsr.u.t_ofs[i]
      14 8+4*N individual 5th axis geometory offset tofsr.u.t_ofs[i]
      15 8+4*N individual 5th axis wear offset tofsr.u.t_ofs[i]
      -13 8+8*N all 4th axis geometory offset tofsr.u.t_ofs_ex[i].data[0]
      4th axis wear offset tofsr.u.t_ofs_ex[i].data[1]
      -15 8+8*N all 5th axis geometory offset tofsr.u.t_ofs_ex[i].data[0]
      5th axis wear offset tofsr.u.t_ofs_ex[i].data[1]

    N is number of offset to be read, i = 0,..,(N-1).


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ODBTOFS structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Offset type(type) is wrong.

    ncdata\cnc_rdvolc

    Reads the 3-dimensional error compensation data by specified range.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdvolc(unsigned short FlibHndl,ODBVOLC *volc, long *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    volc in

    Pointer to the ODBTOFS structure including the reading information of 3-dimensional error compensation data. The ODBVOLC structure is as follows.

    typedef struct odbvolc {
        long   start_no ;  /* Reading start compensation number */
        long   start_ax ;  /* Reading start axis index */
        long   end_no ;    /* Reading end compensation number */
        long   end_ax ;    /* Reading end axis index */
        long   num ;       /* Reading number */
        char   type ;      /* 0:Read by number  1:Read by end number specification */
        long   data[72] ;  /* Reserved */
    } ODBVOLC ;
    
    start_no
    Specify the compensation number which the reading start.
    The range is 1-15625.
    start_ax
    Specify the axis index number which the reading start.
    The range is 1-3.
    end_no
    Specify the compensation number which the reading end. This argument is effective at type=1.
    The range is 1-15625.
    end_ax
    Specify the axis index number which the reading end. This argument is effective at type=1.
    The range is 1-3.
    num
    Specify the reading number. This argument is effective at type=0.
    The range is 1-78.
    type
    Specify the reading method type.
    0 : Read by number(Specify the "num")
    1 : Read by end number specification(Specify the "end_no","end_ax")

    When type=1 is specified for the reading method type, specify the other argument to become the following.

    1 <= ((end_no - start_no) * 3 + (end_ax - start_ax) + 1) <= 78

    data out

    Pointer to the area to store the 3-dimensional error compensation data. The number of maximum data which can read is 78.

    (Maximum size is data[78].)

    Data is stored in order of the 1st axis, 2nd axis and the 3rd axis from the little number.

    For example, when the data from the 3rd axis in No.5 to the 1st axis in No.8 is acquired by the end number specification, the acquired data becomes as follows.


    ODBVOLC volc ;

    long data[78] ;


    volc.start_no = 5

    volc.start_ax = 3

    volc.end_no = 8

    volc.end_ax = 1

    volc.type = 1


    The 3-dimensional error compensation data is stored as follows.


    data[0] 3-dimensional error compensation data of 3rd axis in No.5.

    data[1] 3-dimensional error compensation data of 1st axis in No.6.

    data[2] 3-dimensional error compensation data of 2nd axis in No.6.

    data[3] 3-dimensional error compensation data of 3rd axis in No.6.

    data[4] 3-dimensional error compensation data of 1st axis in No.7.

    data[5] 3-dimensional error compensation data of 2nd axis in No.7.

    data[6] 3-dimensional error compensation data of 3rd axis in No.7.

    data[7] 3-dimensional error compensation data of 1st axis in No.8.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Reading start compensation number(start_no) is wrong.
    2 : Reading start axis index number(start_ax) is wrong.
    3 : Reading end compensation number(end_no) is wrong.
    4 : Reading end axis index number(end_ax) is wrong.
    5 : Reading number(num) is wrong.
    6 : Reading type(type) is wrong.
    EW_NOOPT No option
    This function needs the 3-dimensional error compensation and the extended driver/library function option.

    ncdata\cnc_rdvolccomp

    The compensation amount at the current position of 3-dimensional error compensation axis is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdvolccomp(unsigned short FlibHndl, ODBVOLCOMP *pvcmp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pvcmp out

    Pointer to the ODBVOLCOMP structure to store the compensation amount data of each axis. The ODBVOLCOMP structure is as follows.

    typedef struct pvcmp {
        long       comp[3] ;      /* Compensation amount of each axis  */
    } ODBVOLCOMP ;
    
    comp
    The compensation amount of each axis is acquired.
    comp[0] : The compensation amount of 1st axis.
    comp[1] : The compensation amount of 2nd axis.
    comp[2] : The compensation amount of 3rd axis.

    ERRORS

    Code Description
    EW_NOOPT No option
    This function needs the 3-dimensional error compensation and the extended driver/library function option.

    ncdata\cnc_rdwkcdsfms

    Reads the work coordinate shift measured value specified by "axis". The work coordinate shift measured value are stored in "data" array of "IODBWCSF" with signed binary format.

    The value for all axes can be read at a time by specifying ALL_AXES for "axis".

    The places of decimal points can be got by cnc_getfigure function.

    The unit of work coordinate shift measured value is the same as "Read work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdwkcdsfms(unsigned short FlibHndl, short axis, short length, IODBWCSF *wkcdsfms);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify the axis number.

    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBWCSF structure).

    IODBWCSF

    1 axis all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    • Series 30i, 0i-D/F
    • n = Maximum controlled axes (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • n = Current controlled axes

    wkcdsfms out

    Pointer to the IODBWCSF structure for the work coordinate shift measured value. The IODBWCSF structure is as follows.

    typedef struct iodbwcsf {
            short   dummy;         /* (not used)               */
            short   type;          /* axis number              */
            long    data[MAX_AXIS];/* work coordinate shift    */
                                   /*           measured value */
    } IODBWCSF ;            /* MAX_AXIS : max. controlled axes */
    

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBWCSF structure(length) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    CNC parameter '1201#6' must be 0.

    ncdata\cnc_rdwkcdshft

    Reads the work coordinate shift value specified by "axis". The work coordinate shift value are stored in "data" array of "IODBWCSF" with signed binary format.

    The value for all axes can be read at a time by specifying ALL_AXES for "axis".

    The places of decimal points can be got by cnc_getfigure function.

    The unit of work coordinate shift value is as follows.

    • Series 16/18/21, 16i/18i/21i, 0i
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001

    • Series 30i
    • 1013#3
      (ISE)
      1013#2
      (ISD)
      1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 0 0 1 0.01 0.001 0.01
      IS-B 0 0 0 0 0.001 0.0001 0.001
      IS-C 0 0 1 0 0.0001 0.00001 0.0001
      IS-D 0 1 0 0 0.00001 0.000001 0.00001
      IS-E 1 0 0 0 0.000001 0.0000001 0.000001

    • Series 0i-D/F
    • 1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdwkcdshft(unsigned short FlibHndl, short axis, short length, IODBWCSF *wkcdshft);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify the axis number.

    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBWCSF structure).

    IODBWCSF

    1 axis all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    • Series 30i, 0i-D/F
    • n = Maximum controlled axes (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • n = Current controlled axes

    wkcdshft out

    Pointer to the IODBWCSF structure for the work coordinate shift value. The IODBWCSF structure is as follows.

    typedef struct iodbwcsf {
            short   dummy;         /* (not used)                 */
            short   type;          /* axis number                */
            long    data[MAX_AXIS];/* work coordinate shift value*/
    } IODBWCSF ;            /* MAX_AXIS : max. controlled axes   */
    

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBWCSF structure(length) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    CNC parameter '1201#6' must be 0.

    ncdata\cnc_rdzofs

    Reads the work zero offset value specified by "number", "axis".
    The offset value is stored in "data[0]" of "IODBZOFS" with signed binary format.
    Reads the offset value for all axes once by specifying 'ALL_AXES' in 'axis'. The offset value for each axis is stored in "data" array of "IODBZOFS".

    The place of decimal point can be got by cnc_getfigure function.

    The unit of offset value is as follows.

    • Series 15
    • 1009#1
      (ISE)
      1004#5
      (ISD)
      1004#1
      (ISF)
      1004#0
      (ISR)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 0 0 1 0.01 0.001 0.01
      IS-B 0 0 0 0 0.001 0.0001 0.001
      IS-C 0 0 1 0 0.0001 0.00001 0.0001
      IS-D 0 1 0 0 0.00001 0.000001 0.00001
      IS-E 1 0 0 0 0.000001 0.0000001 0.000001

    • Series 15i
    • 1012#3
      (ISE)
      1012#2
      (ISD)
      1012#1
      (ISC)
      1012#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 0 0 1 0.01 0.001 0.01
      IS-B 0 0 0 0 0.001 0.0001 0.001
      IS-C 0 0 1 0 0.0001 0.00001 0.0001
      IS-D 0 1 0 0 0.00001 0.000001 0.00001
      IS-E 1 0 0 0 0.000001 0.0000001 0.000001

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001

    • Series 30i
    • 1013#3
      (ISE)
      1013#2
      (ISD)
      1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 0 0 1 0.01 0.001 0.01
      IS-B 0 0 0 0 0.001 0.0001 0.001
      IS-C 0 0 1 0 0.0001 0.00001 0.0001
      IS-D 0 1 0 0 0.00001 0.000001 0.00001
      IS-E 1 0 0 0 0.000001 0.0000001 0.000001

    • Series 0i-D/F
    • 1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdzofs(unsigned short FlibHndl, short number, short axis, short length, IODBZOFS *zofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the work zero offset number.

    • Series 15/15i, 0i-D
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,54 : Work zero offset value of G54.1P1 through G54.1P48

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • M Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
      T Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59

    • Series 0i-F, 30i
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes(ALL_AXES=-1)
      1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBZOFS structure).

    IODBZOFS

    1 axis all axis
    • Series 15/15i, 30i, 0i-D/F
    • n = Maximum controlled axes
      * The data for current controlled axes are valid.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • n = Current controlled axes

    zofs out

    Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.

    typedef struct  iodbzofs {
            short   datano;         /* offset number */
            short   type;           /* axis number */
            long    data[MAX_AXIS]; /* offset data value */
    } IODBZOFS ;             /* MAX_AXIS : max. controlled axes */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the work zero offset number.

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes(ALL_AXES=-1)
      1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBZOFS structure).

    IODBZOFS

    1 axis all axis
    n = Maximum controlled axes(The data for current controlled axes are valid).
    zofs out

    Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.

    typedef struct  iodbzofs {
            short   datano;         /* offset number */
            short   type;           /* axis number */
            long    data[MAX_AXIS]; /* offset data value */
    } IODBZOFS ;             /* MAX_AXIS : max. controlled axes */
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBZOFS structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option(Series 16/18/21, 16i/18i/21i, 0i, 30i)
    This function needs the work zero offset option.

    ncdata\cnc_rdzofsinfo

    Reads the available number of work zero offset. It is stored in "*use_no" with signed binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdzofsinfo(unsigned short FlibHndl, short *use_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    use_no out

    Available number of work zero offset

    • Series 15/15i, 0i-D
    • M series 7/55 sets
    • Series 16/18/21, 16i/18i/21i, 0i
    • M series 7/55/307 sets
      T series 7 sets
    • Series 0i-F, 30i
    • 7/55/307 sets
    • Series 16i/18i-W
    • 7 sets
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    use_no out

    Available number of work zero offset (7/55/307 sets)


    ERRORS

    Code Description
    EW_NOOPT No option (Series 16/18/21, 16i/18i/21i, 0i, 30i)
    This function needs the work zero offset option.

    ncdata\cnc_rdzofsr

    Reads the work zero offset value specified by "s_number", "e_number", "axis". The offset value is stored in "data" array of "IODBZOR" with signed binary format.

    Reads the offset value for all axes once by specifying 'ALL_AXES' in 'axis'.

    The place of decimal point can be got by cnc_getfigure function.

    The unit of offset value is the same as cnc_rdzofs function. See the description of cnc_rdzofs function.

    As for Series 16i/18i-W, the unit of offset value is as follows.

    • Series 16i/18i-W
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdzofsr(unsigned short FlibHndl, short s_number, short axis, short e_number, short length, IODBZOR *zofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start work zero offset number.

    • Series 15/15i, 0i-D
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,54 : Work zero offset value of G54.1P1 through G54.1P48

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • M Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
      T Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59

    • Series 0i-F, 30i
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300

    • Series 16i/18i-W
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59

    e_number in

    Specify the end work zero offset number.

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes(ALL_AXES=-1)
      1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBZOR structure).
    (8+4*(number of axes)*(number of offset))

    IODBZOR

    1 axis all axes

    n = Maximum controlled axes(The data for current controlled axes are valid.)
    K = Number of offset to be read

    zofsr out

    Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
        short   datano_s;        /* start offset number  */
        short   type;            /* axis number  */
        short   datano_e;        /* end offset number  */
        long    data[MAX_AXIS*K];/* offset data value  */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes  */
                      /* K : number of offset  */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start work zero offset number.

      0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
    e_number in

    Specify the end work zero offset number.

    axis in

    Specify the axis number.

      ALL_AXES : assigns all axes(ALL_AXES=-1)
      1,..,m : assigns 1 axis(m=current controlled axes)
    length in

    Specify the data block length(size of IODBZOR structure).
    (8+4*(number of axes)*(number of offset))

    IODBZOR

    1 axis all axes
    n = Maximum controlled axes(The data for current controlled axes are valid.)
    K = Number of offset to be read
    zofsr out

    Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
        short   datano_s;        /* start offset number  */
        short   type;            /* axis number  */
        short   datano_e;        /* end offset number  */
        long    data[MAX_AXIS*K];/* offset data value  */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes  */
                      /* K : number of offset  */
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBZOR structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(s_number, e_number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option(Series 16/18/21, 16i/18i/21i, 0i, 30i)
    This function needs the work zero offset option.

    ncdata\cnc_setmactype

    Changes the type of custom macro variable which is used by cnc_rdmacro, cnc_wrmacro, cnc_rdmacror, cnc_wrmacror functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setmactype(unsigned short FlibHndl, short macro_type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    macro_type in
    Type of custom macro variable
    0 : decimal form floating-point type (default)
    none zero : binary form floating-point type

    ERRORS

    Code Description

    ncdata\cnc_setpmactype

    Changes the type of P code macro variable which is used by cnc_rdpmacro, cnc_wrpmacro, cnc_rdpmacror, cnc_wrpmacror functions.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setpmactype(unsigned short FlibHndl, short pmacro_type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pmacro_type in
    Type of P code macro variable
    0 : decimal form floating-point type (default)
    none zero : binary form floating-point type

    ERRORS

    Code Description

    ncdata\cnc_tofs_rnge

    Reads the effective setting range of tool offset value specified by "number", "type".
    The effective setting range is stored in "data_min", "data_max" of ODBDATRNG with signed binary format.

    The unit of offset value is as follows.

    • Series 30i
    • 5042#3
      (OFE)
      5042#2
      (OFD)
      5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      0 0 0 1 0.01 0.001
      0 0 0 0 0.001 0.0001
      0 0 1 0 0.0001 0.00001
      0 1 0 0 0.00001 0.000001
      1 0 0 0 0.000001 0.0000001

    • Series 0i-D/F
    • 5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      0 1 0.01 0.001
      0 0 0.001 0.0001
      1 0 0.0001 0.00001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_tofs_rnge(unsigned short FlibHndl,short number, short type,ODBDATRNG *tofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool offset number.
    The available number of tool offset can be got by cnc_rdtofsinfo function.

    type in

    Specify the tool offset type.(see the following table)

    • Machining Center Series (M series)
    • Cutter radius Tool length Imaginary tool nose
      Wear 0 2 6
      Geometry 1 3 7
      Specify "cutter radius" in case of no distinction of cutter radius/tool length, and "wear" in case of no distinction of wear/geometry.

    • Lathe Series (T series)
    • X axis Z axis Nose R Imaginary tool nose Y axis
      Wear 0 2 4 6 8
      Geometry 1 3 5 7 9
      Specify "wear" in case of no distinction of wear/geometry.

    • Lathe Series/2nd geometry compensation
    • X axis Z axis Y axis
      Wear 100 101 102
    tofsr out

    Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of tool offset value. The ODBDATRNG structure is as follows.

    typedef struct odbdatrng {
        long    data_min ;   /* lower limit */
        long    data_max ;   /* upper limit */
        long    status;      /* status of setting value */
    } ODBDATRNG ;
    
    data_min
    lower limit of effective setting range

    data_max
    upper limit of effective setting range

    status
    status of setting value
    0 : in-range of effective setting range
    1 : out-range of effective setting range


    ERRORS

    Code Description
    EW_NUMBER Data number error
    Offset number(number) is wrong.
    EW_ATTRIB Data attribute error
    Offset type(type) is wrong.
    EW_DATA Effective setting range cannot be acquired
    In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : error other than EW_DATA
    1 : setting of input data range check is void
    2 : setting of input data range check is wrong (upper or lower limit is invalid)
    3 : setting of input data range check is wrong (offset number overlaps with others)

    ncdata\cnc_wksft_rnge

    Reads the effective setting range of work coordinate shift value specified by "axis".
    The effective setting range is stored in "data_min", "data_max" of ODBDATRNG with signed binary format.

    The places of decimal points can be got by cnc_getfigure function.

    The unit of work coordinate shift value is as follows.

    • Series 30i
    • 1013#3
      (ISE)
      1013#2
      (ISD)
      1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      IS-A 0 0 0 1 0.01 0.001
      IS-B 0 0 0 0 0.001 0.0001
      IS-C 0 0 1 0 0.0001 0.00001
      IS-D 0 1 0 0 0.00001 0.000001
      IS-E 1 0 0 0 0.000001 0.0000001

    • Series 0i-D/F
    • 1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      IS-A 0 1 0.01 0.001
      IS-B 0 0 0.001 0.0001
      IS-C 1 0 0.0001 0.00001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wksft_rnge(unsigned short FlibHndl, short axis,ODBDATRNG *wkcdshftr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify the axis number to be read.

      1,..,m : assigns 1 axis(m=current controlled axes)
    wkcdshft out

    Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of work coordinate shift value. The ODBDATRNG structure is as follows.

    typedef struct odbdatrng {
        long    data_min ;   /* lower limit */
        long    data_max ;   /* upper limit */
        long    status;      /* status of setting value */
    } ODBDATRNG ;
    
    data_min
    lower limit of effective setting range

    data_max
    upper limit of effective setting range

    status
    status of setting value
    0 : in-range of effective setting range
    1 : out-range of effective setting range


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    CNC parameter '1201#6' must be 0.
    EW_DATA Effective setting range cannot be acquired
    In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : error other than EW_DATA
    1 : setting of input data range check is void
    2 : setting of input data range check is wrong
    (upper or lower limit is invalid)

    ncdata\cnc_wrbtofsr

    Writes the tool offset value for B axis specified by "datano_s", "datano_e","type". The offset value must be stored in "IODBBTO" with signed binary format.

    The unit of offset value is the same as "Write tool offset value( cnc_wrtofs )". See the description of cnc_wrtofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrbtofsr(unsigned short FlibHndl, short length, IODBBTO *btofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length.

    btofsr in

    Pointer to the IODBBTO structure including the tool offset value. The IODBBTO structure is as follows.

    typedef struct  iodbbto {
        short datano_s;     /* start offset number */
        short type;         /* offset type         */
        short datano_e;     /* end offset number   */
        long  ofs[M];       /* offset value        */
    } IODBBTO ;     /* Individual, Memory A all               */
                    /*   M is number of the offset value.     */
                    /* Memory B all                           */
                    /*   M is number of the offset value x 2. */
    
    datano_s
    Specify the start tool offset number.
    The available number is 1,...,9.
    'This number + aux. function number which can be got by cnc_rdbtofsinfo function + 1' means the tool offset number for B axis which is used by NC command or display.

    datano_e
    Specify the end tool offset number.
    The available number is 1,...,9.

    type
    Specify the tool offset type.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBBTO structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(datano_s, datano_e) is wrong.
    EW_ATTRIB Data attribute error
    Offset type(type) is wrong.
    EW_NOOPT No option
    The B axis control option and the extended driver/library function are necessary.

    ncdata\cnc_wrfixofs

    Writes the fixture offset value specified by "datano_s", "datano_e", "type". The offset value must be stored in "data" array of "IODBZOR" with signed binary format.
    The value for all axes can be written at a time by specifying 'ALL_AXES' in 'type'.

    The unit of offset value is the same as "Read work zero offset value ( cnc_rdzofs )". See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrfixofs(unsigned short FlibHndl, short length, IODBZOR *fixofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length (size of IODBZOR structure).

    (8+4*(number of axes)*(number of offset))

    IODBZOR

    1 axis all axes

    n = Maximum controlled axes (* The data for current controlled axes are valid.)
    K = Number of offset to be written

    fixofsr in

    Pointer to the IODBZOR structure for the fixture offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
            short   datano_s;         /* start offset number */
            short   type;             /* axis number */
            short   datano_e;         /* end offset number */
            long    data[MAX_AXIS*K]; /* offset data value */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes */
                      /* K : number of offset */
    
    datano_s
    Specify the start fixture offset number. Available number is from 1 to 8.

    datano_e
    Specify the end fixture offset number. Available number is from 1 to 8.

    type
    Specify the axis number.
      ALL_AXES : assigns all axes (ALL_AXES=-1)
      1,..,m : assigns 1 axis (m=current controlled axes)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_LENGTH Data block length error
    Size of IODBZOR structure(length) is wrong.
    EW_NUMBER Data number error
    Fixture offset number(datano_s,datano_e) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_NOOPT No option
    The rotary table dynamic fixture offset option and the extended driver/library function are necessary.
    The custom macro B option is necessary(only 16i/18i/21i).

    ncdata\cnc_wrhpccset

    Writes setting data for high-speed and high-precision machining.

    This function is not supported on Series 15i. The function which writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data to be written by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhpccset(unsigned short FlibHndl, IODBHPST *hpst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hpst in

    Pointer to the IODBHPST structure for the setting data for High-speed and high-precision machining. The IODBHPST structure is as follows.

    typedef struct iodbhpst {
        short   slct;       /* flag of valid data */
        short   hpcc;       /* high precision contour control */
        short   multi;      /* multi buffer */
        short   ovr1;       /* override by Z-axis down */
        short   ign_f;      /* ignore feed at program */
        short   foward;     /* feed forward */
        long    max_f;      /* maximum feed of high precision */
                            /*                contour control */
        short   ovr2;       /* override at area 2 */
        short   ovr3;       /* override at area 3 */
        short   ovr4;       /* override at area 4 */
        long    reserve[7]; /* (not used) */
    } IODBHPST ;
    
    slct
    Flag of valid data selection must be set.

    bit 0 : high precision contour control
    bit 1 : multi buffer
    bit 2 : override by Z-axis down
    bit 3 : ignore feed at program
    bit 4 : feed forward
    bit 5 : maximum feed of high precision contour control
    bit 6 : override at area 2
    bit 7 : override at area 3
    bit 8 : override at area 4
    bit 9,..,15 : (not used)

    * In order to write the data to CNC, turn on the corresponding bit on this data.

    hpcc
    Specify valid/invalid of high precision contour control.

    0 : invalid
    1 : valid

    multi
    Specify valid/invalid of multi buffer.

    0 : invalid
    1 : valid

    ovr1
    Specify valid/invalid of override by Z-axis down.

    0 : invalid
    1 : valid

    ign_f
    Specify valid/invalid of ignore feed at program.

    0 : invalid
    1 : valid

    foward
    Specify valid/invalid of feed forward.

    0 : invalid
    1 : valid

    max_f
    Specify maximum feed of high precision contour control.

    ovr2
    Specify override at area 2.

    ovr3
    Specify override at area 3.

    ovr4
    Specify override at area 4.

    reserve[7]
    (not used)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_DATA Data error
    Setting data for high-speed and high-precision machining(IODBHPST) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : hpcc
    2 : multi
    3 : ovr1
    4 : ign_f
    5 : foward
    6 : max_f
    7 : ovr2
    8 : ovr3
    9 : ovr4
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    - Protection KEY(DI/KEY2) is off.
    - CNC parameter is a state of write-protection.
    EW_MODE CNC mode error
    The mode is not in MDI.

    ncdata\cnc_wrhpcctuac

    Writes tuning data(acc./dec. input) for high-speed and high-precision machining.

    This function is not supported on Series 15i. The function which writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data to be written by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhpcctuac(unsigned short FlibHndl, IODBHPAC *hpac);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hpac in

    Pointer to the IODBHPAC structure for the tuning data(acc./dec. input) for high-speed and high-precision machining. The IODBHPAC structure is as follows.

    typedef struct iodbhpac {
        struct {
            short   slct;       /* flag of valid data */
            short   diff;       /* (not used) */
            short   fine;       /* fine level */
            short   acc_lv;     /* acceleration/deceleration level*/
            long    bipl;       /* acceleration for before IPL */
            short   aipl;       /* time constant for after IPL */
            long    corner;     /* difference of corner feed */
            long    clamp;      /* acceleration for clamp */
            long    c_acc;      /* acceleration of feed clamp by */
                                /*               radius of circle*/
            long    foward;     /* coefficient of feed forward */
            long    reserve[8]; /* (not used) */
        }tune[3]
    } IODBHPAC ;
    
    hpac.tune[0].slct,...,hpac.tune[0].reserve
                                    : tuning data for fine level
    hpac.tune[1].slct,...,hpac.tune[1].reserve
                                    : tuning data for medium level
    hpac.tune[2].slct,...,hpac.tune[2].reserve
                                    : tuning data for rough level
    
    slct
    Flag of valid data selection must be set.

    bit 0 : fine level
    bit 1 : acceleration/deceleration level
    bit 2 : acceleration for before IPL
    bit 3 : time constant for after IPL
    bit 4 : difference of corner feed
    bit 5 : acceleration for clamp
    bit 6 : acceleration of feed clamp by radius of circle
    bit 7 : coefficient of feed forward
    bit 8,..,15 : (not used)

    * In order to write the data to CNC, turn on the corresponding bit on this data.

    diff
    (not used)

    fine
    Specify fine level.

    acc_lv
    Specify acceleration/deceleration level.

    bipl
    Specify acceleration for before IPL.

    aipl
    Specify time constant for after IPL.

    corner
    Specify difference of corner feed.

    clamp
    Specify acceleration for clamp.

    c_acc
    Specify acceleration of feed clamp by radius of circle.

    foward
    Specify coefficient of feed forward.

    reserve[8]
    (not used)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_DATA Data error
    Tuning data for high-speed and high-precision machining(IODBHPAC) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : fine
    2 : acc_lv
    3 : bipl
    4 : aipl
    5 : corner
    6 : clamp
    7 : c_acc
    8 : foward
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    - Protection KEY(DI/KEY2) is off.
    - CNC parameter is a state of write-protection.
    EW_MODE CNC mode error
    The mode is not in MDI.

    ncdata\cnc_wrhpcctupr

    Writes tuning data(parameter input) for high-speed and high-precision machining.

    This function is not supported on Series 15i. The function which writes CNC parameter ( cnc_wrparam or cnc_wrparas ) can be substituted for this function.
    Refer to CNC operator's manual and CNC parameter manual in order to know CNC parameters which correspond to the data to be written by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrhpcctupr(unsigned short FlibHndl, IODBHPPR *hppr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hppr out

    Pointer to the IODBHPPR structure for the tuning data(parameterinput) for high-speed and high-precision machining. The IODBHPPR structure is as follows.

    typedef struct iodbhppr {
        struct {
            short   slct;       /* flag of valid data */
            short   diff;       /* (not used) */
            short   fine;       /* fine level */
            short   acc_lv;     /* acceleration/deceleration level*/
            long    max_f;      /* maximum feed */
            short   bipl;       /* time constant for before IPL */
            short   aipl;       /* time constant for after IPL */
            long    corner;     /* difference of corner feed */
            short   clamp;      /* clamp by acceleration */
            long    radius;     /* radius of feed clamp by radius*/
                                /*                      of circle*/
            long    max_cf;     /* maximum feed of feed clamp by */
                                /*               radius of circle*/
            long    min_cf;     /* minimum feed of feed clamp by */
                                /*               radius of circle*/
            long    foward;     /* coefficient of feed forward */
            long    reserve[5]; /* (not used) */
        }tune[3]
    } IODBHPPR ;
    
    hppr.tune[0].slct,...,hppr.tune[0].reserve
                                    : tuning data for fine level
    hppr.tune[1].slct,...,hppr.tune[1].reserve
                                    : tuning data for medium level
    hppr.tune[2].slct,...,hppr.tune[2].reserve
                                    : tuning data for rough level
    
    slct
    Flag of valid data selection must be set.

    bit 0 : fine level
    bit 1 : acceleration/deceleration level
    bit 2 : maximum feed
    bit 3 : time constant for before IPL
    bit 4 : time constant for after IPL
    bit 5 : difference of corner feed
    bit 6 : clamp by acceleration
    bit 7 : radius of feed clamp by radius of circle
    bit 8 : maximum feed of feed clamp by radius of circle
    bit 9 : minimum feed of feed clamp by radius of circle
    bit10 : coefficient of feed forward
    bit11,..,15 : (not used)

    * In order to write the data to CNC, turn on the corresponding bit on this data.

    diff
    (not used)

    fine
    Specify fine level.

    acc_lv
    Specify acceleration/deceleration level.

    max_f
    Specify maximum feed.

    bipl
    Specify time constant for before IPL.

    aipl
    Specify time constant for after IPL.

    corner
    Specify difference of corner feed.

    clamp
    Specify clamp by acceleration.

    radius
    Specify radius of feed clamp by radius of circle.

    max_cf
    Specify maximum feed of feed clamp by radius of circle.

    min_cf
    Specify minimum feed of feed clamp by radius of circle.

    foward
    Specify coefficient of feed forward.

    reserve[5]
    (not used)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at T Series.
    EW_DATA Data error
    Tuning data for high-speed and high-precision machining(IODBHPPR) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    1 : fine
    2 : acc_lv
    3 : max_f
    4 : bipl
    5 : aipl
    6 : corner
    7 : clamp
    8 : radius
    9 : max_cf
    10 : min_cf
    11 : foward
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    - Protection KEY(DI/KEY2) is off. - CNC parameter is a state of write-protection.
    EW_MODE CNC mode error
    The mode is not in MDI.

    ncdata\cnc_wrintchk

    Writes the coordinate value of interference check area specified by "datano_s","datano_e","type".
    The coordinate value must be stored in "data" array of "IODBINT" with signed binary format.
    All value can be written at a time by specifying ALL_AXES for "type".

    The unit of coordinate value is the same as "Read work zero offset value( cnc_rdzofs )". See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrintchk(unsigned short FlibHndl, short length, IODBINT *intchk);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length (size of IODBINT structure).

    (8+4*(number of coordinate)*(number of data))

    T series

    IODBINT

    1 coordinate all coordinate
    K : Number of data to be written

    M series

    IODBINT

    1 coordinate all coordinate

    intchk in

    Pointer to the IODBINT structure for the coordinate value of interference check data. The IODBINT structure is as follows.

    typedef struct  iodbint {
            short   datano_s;       /* start data number */
            short   type;           /* coordinate type   */
            short   datano_e;       /* end data number   */
            long    data[8*K];      /* coordinate value  */
    } IODBINT ;     /* K : number of data to be written  */
    
    datano_s
    Specify the start interference check data number.
    The available number of interference check data can be got by cnc_rdintinfo function.

    datano_e
    Specify the end interference check data number.

    type
    Specify the type of coordinate.

    ALL_AXES : assigns all coordinates(ALL_AXES=-1)
    1,..,m : assigns 1 coordinate(TT:m=7, MM:m=5)

    In case of 1 coordinate, 'type' is as follows.

    T series type coordinate
    0 X (area 1)
    1 Z (area 1)
    2 I (area 1)
    3 K (area 1)
    4 X (area 2)
    5 Z (area 2)
    6 I (area 2)
    7 K (area 2)
    M series type coordinate
    0 X
    1 Y
    2 Z
    3 I
    4 J
    5 K

    data
    Specify the coordinate value of interference check data.
    Refer to description of length, type for the storing sequence of data.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used without 2 path control function.
    EW_LENGTH Data block length error
    Size of IODBINT structure(length) is wrong.
    EW_NUMBER Data number error
    Type of coordinate(type) is wrong.
    EW_ATTRIB Data attribute error
    Type of coordinate(type) is wrong.
    EW_DATA Data error
    Coordinate value of interference check area (data) is out of range.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. Data number will be set onto the member of err_no of ODBERR structure and type of coordinate will be set onto the member of err_dtno of ODBERR structure.
    EW_NOOPT No option
    The tool post interference check option (T series) or the multi-path interference check option (M series), and the extended driver/library function are necessary.

    ncdata\cnc_wrmacro

    Writes the custom macro variable specified by "number". The data must be stored in "mcr_val", "dec_val" with signed binary format.

    The kind of custom macro variable is as follows. The local variable cannot be written.

    1. Common variable (#100 to #999)
    2. See the description of cnc_rdmacroinfo function about the available range of common variables.
    3. System variable (#1000 to #9999)
    4. #3000, #3003, #3004 and #3006 cannnot be written.

    It is possible to exchange the type of macro variable by cnc_setmactype function.

    • decimal form floating-point type (data format=M*10**(-E))

    • mcr_val : value of variable(=M)
      4-byte binary data with sign
      (available range:999999999 to -999999999)
      dec_val : number of places of decimals(=E)
      2-byte binary data with sign
      (available range:-128 to 127)

    • binary form floating-point type (data format=M*2**(-E))

    • mcr_val : numerical part of variable(=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable(=E)
      2-byte binary data with sign
      (available range:-128 to 127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmacro(unsigned short FlibHndl, short number, short length, long mcr_val, short dec_val);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the custom macro variable number.

    length in

    Specify 10.

    mcr_val in

    Specify the value of variable/numerical part of variable.

    dec_val in

    Specify the number of places of decimals/exponent part of variable.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size (length) is wrong.
    EW_NUMBER Data number error
    Custom macro variable number (number) is wrong.
    EW_DATA Data error
    Value of custom macro variable (mcr_val, dec_val) is out of available range.
    EW_NOOPT No option
    This function needs the custom macro option.
    EW_PROT protection error (30i/31i/32i, 0i-D/F, PMi-A only)
    The variable is read-only.

    ncdata\cnc_wrmacror

    Writes the custom macro variable specified by "datano_s", "datano_e". The data must be stored in "IODBMR" with signed binary format.

    The kind of custom macro variable is as follows. The local variable cannot be written.

    1. Common variable (#100,..,#999)
    2. See the description of cnc_rdmacroinfo function about the available range of common variables.

    It is possible to exchange the type of macro variable by cnc_setmactype function.

    • decimal form floating-point type (data format=M*10**(-E))
    • mcr_val : value of variable(=M)
      4-byte binary data with sign
      (available range:999999999,..,-999999999)
      dec_val : number of places of decimals(=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    • binary form floating-point type (data format=M*2**(-E))
    • mcr_val : numerical part of variable(=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable(=E)
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmacror(unsigned short FlibHndl, short length, IODBMR *macror);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length (size of IODBMR structure).

    8+8*(Number of custom macro variable)

    IODBMR

    N : Number of custom macro variable

    macror in

    Pointer to the IODBMR structure including the custom macro variable. The IODBMR structure is as follows.

    typedef struct iodbmr {
        short datano_s; /* start custom macro variable number*/
        short dummy;    /* (not used) */
        short datano_e; /* end custom macro variable number */
        struct {
            long  mcr_val; /* value of custom macro var. */
            short dec_val; /* number of places of decimals*/
        } data[N];         /* N : number of variable */
    } IODBMR;
    
    datano_s
    Specify the start custom macro variable number.

    datano_e
    Specify the end custom macro variable number.

    mcr_val
    Specify the value of variable/numerical part of variable.

    dec_val
    Specify the number of places of decimals/exponent part of variable.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBMR structure(length) is wrong.
    EW_NUMBER Data number error
    Custom macro variable number(datano_s, datano_e) is wrong.
    EW_DATA Data error
    Value of custom macro variable(mcr_val, dec_val) is out of available range.
    EW_NOOPT No option
    This function needs the custom macro option.
    EW_PROT protection error (30i/31i/32i, 0i-D/F, PMi-A only)
    The variable is read-only.

    ncdata\cnc_wrmacror2

    Writes the custom macro variables specified by the starting number, "s_no", and number of variables, "*num". The data is stored in "data" with double format. It is not influenced by setting of cnc_setmactype function.

    The kind of custom macro variable is as follows. The local variable(#1,..,#33) cannot be written.

    (1) Common variable (#100,..,#999)
    See the description of cnc_rdmacroinfo function about the available range of common variables.
    (2) Common variable (#98000〜#98499)
    See the description of cnc_rdmacroinfo function about the available range of common variables.

    The value of an undefined variable is called "vacant", and it is expressed as follows.

    0xFFFFFFFFFFFFFFFF

    See "OPERATOR'S MANUAL" of CNC for details of the custom macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmacror2(unsigned short FlibHndl, unsigned long s_no, unsigned long *num, double *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start custom macro variable number.

    num in/out

    Specify pointer to the number of custom macro variable.
    The number which was written actually is returned.

    data in

    Pointer to the data of custom macro variable.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of custom macro variables(*num) is 0 or less.
    EW_NUMBER Data number error
    Custom macro variable number(s_no) is wrong.
    EW_NOOPT No option
    This function needs the custom macro option.
    EW_PROT protection error
    The variable is read-only.

    ncdata\cnc_wrmgrpdata

    Writes specified number of M code group data starting from the specified number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmgrpdata(unsigned short FlibHndl, IDBMGRP *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf in

    Pointer to the IDBMGRP structure which specifies the M code group data to be written. The IDBMGRP structure is as follows.

    typedef struct idbmgrp {
        short   s_no;
        short   dummy;
        short   num;
        short   group[N];
    } IDBMGRP;
    /* N stands for the number of M code group data being written.(Maximum 500) */
    
    s_no
    Specify starting number.
    Valid range is from 0 to 499.

    num
    Specify the number of the data to be written.
    Valid range is from 1 to 500.

    group
    Specify M code group number to be written.
    Valid range is from 0 to 127.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number indication(num) is wrong.
    EW_NUMBER Data number error
    The start number(s_no) is wrong.
    EW_DATA Data error
    The number of M code group is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : error except EW_DATA
    1 : error of M code group number
    And the wrong array number will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT No option
    The M code group option and the extended driver/library function are necessary.
    EW_MODE CNC mode error
    The mode is not in MDI.
    EW_REJECT CNC execution rejected
    MDI operation is in progress.
    EW_PROT Write protection(Series 15, 0i-F, 30i)
    'Parameter write enable' of CNC parameter is 0.

    ncdata\cnc_wrparam

    Writes the parameter specified by "datano","type"(only for the parameter with axis). The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary.

    Writes the parameter for all axes once by specifying 'ALL_AXES' in 'type'. The parameter for each axis must be stored in each array of "IODBPSD".

    The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is as follows, and can be got by cnc_rdparainfo function.

    Parameter type Meaning Byte size
    Bit parameter Every bits have each definition. 1
    Bit parameter with axis Every bits have each definition. (each axis) 1
    Byte parameter 1-byte data is stored. 1
    Byte parameter with axis 1-byte data is stored. (each axis) 1
    Word parameter 2-byte data is stored. 2
    Word parameter with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real parameter
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real parameter with axis
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to write any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are written at the same time.

    PW000 alarm(Series 15/15i, 30i, 0i-D/F, PMi-A), PS000 alarm(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i): "PLEASE TURN OFF POWER" may be issued when some specific parameters are written.

    The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written.

    PW000 alarm: "PLEASE TURN OFF POWER" may be issued when some specific parameters are written.

    The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrparam(unsigned short FlibHndl, short length, IODBPSD *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of parameter)*(number of axis)

    In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, 8 byte.

    IODBPSD

    no axis/1 axis all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param in

    Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* parameter number */
       short type;                /* axis number */
       union {
          char  cdata;            /* bit/byte parameter */
          short idata;            /* word parameter */
          long  ldata;            /* 2-word parameter */
          char  cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
          short idatas[MAX_AXIS]; /* word parameter with axis */
          long  ldatas[MAX_AXIS]; /* 2-word parameter with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    type
    Specify the attribute of parameter.

    • Series 15, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • Specify the axis number.
      0 : no axis
      1,..,m : 1 axis(m=max. controlled axes)
      ALL_AXES : all axes(ALL_AXES=-1)

    • Series 15i
    • Upper byte : type
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      Lower byte : axis
      0 : no axis
      1,..,m : 1 axis(m=max. controlled axes)
      ALL_AXES : all axes(ALL_AXES=-1)

    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Specify the real parameter. Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of parameter)*(number of axis)

    In case that the size of parameter is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 parameter or 1 axis is 1, 2, 8 byte.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param in

    Pointer to the IODBPSD structure including the parameter. The IODBPSD structure is as follows.

    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    type
    Specify the attribute of parameter.

      Specify the axis number.
      0 : no axis
      1,..,m : 1 axis(m=max. controlled axes)
      ALL_AXES : all axes(ALL_AXES=-1)

    rdata, rdatas
    Specify the real parameter. Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPSD structure(length) is wrong.
    EW_NUMBER Data number error
    Parameter number(datano) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_NOOPT No option
    There is no option required for the specified parameter.
    ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
    EW_PROT Write operation is prohibited.
    EW_PASSWD Specified parameter cannot be written because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_wrparas

    Writes all parameters stored in "param". The data format depends on each parameter. The format of Byte/Word/2-Word parameter is generally signed binary.

    Writes the parameter for all axes once by specifying 'ALL_AXES' in 'type'. The parameter for each axis must be stored in each array of "IODBPSD".

    The attribute of CNC parameter depends on the type and axis, and it is different for each parameter. It is as follows, and can be got by cnc_rdparainfo function.

    Parameter type Meaning Byte size
    Bit parameter Every bits have each definition. 1
    Bit parameter with axis Every bits have each definition. (each axis) 1
    Byte parameter 1-byte data is stored. 1
    Byte parameter with axis 1-byte data is stored. (each axis) 1
    Word parameter 2-byte data is stored. 2
    Word parameter with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real parameter
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real parameter with axis
    (only Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to write any bit parameter bit by bit. 8 bits(i.e. 1 byte) which belong to the same parameter number are written at the same time.

    PW000 alarm(Series15/15i, 30i, 0i-D/F, PMi-A), PS000 alarm(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i): "PLEASE TURN OFF POWER" may be issued when some specific parameters are written.

    The error(Return:EW_PROT) is returned when CNC is not in the emergency stop. It is also returned when the locked parameter such as parameter larger than 9000 is written, but other parameters are written.

    PW000 alarm : "PLEASE TURN OFF POWER" may be issued when some specific parameters are written.

    The error(Return:EW_PROT) is returned when the locked parameter such as parameter more than 9000 is written.

    See the "PARAMETER MANUAL" of CNC for details of each parameter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrparas(unsigned short FlibHndl, short length, void *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length which is enough to store the specified parameter.
    The structure per 1 parameter is as follows, and each parameter must be lined up in order of number.

    [= Sum of (4+(byte size of each parameter)*(number of axis))]

    In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes

      n = Maximum controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param in

    Pointer to the area to store the parameters.
    Each parameter can be referred by using the IODBPSD structure.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte parameter */
          short idata;            /* word parameter */
          long  ldata;            /* 2-word parameter */
          char  cdatas[MAX_AXIS]; /* bit/byte parameter with axis*/
          short idatas[MAX_AXIS]; /* word parameter with axis */
          long  ldatas[MAX_AXIS]; /* 2-word parameter with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    type
    Specify the attribute of parameter.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type (only Series 15i, 30i, 0i-D/F, PMi-A)
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)

    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Specify the real parameter.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length which is enough to store the specified parameter.
    The structure per 1 parameter is as follows, and each parameter must be lined up in order of number.

    [= Sum of (4+(byte size of each parameter)*(number of axis))]

    In case that the size of parameter is 2 byte, the IODBPSD structure is as follows. In case that the size of parameter is 1 or 2 byte and the length per 1 parameter is not a multiple of 4, 'dummy' is necessary at the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 parameter or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle parameters have an axis attribute, and the data for number of spindle are valid.

    param in

    Pointer to the area to store the parameters.
    Each parameter can be referred by using the IODBPSD structure.

    typedef struct realprm {     /* real parameter */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* parameter number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte parameter */
          short   idata;           /* word parameter */
          long    ldata;           /* 2-word parameter */
          REALPRM rdata;           /* real parameter */
          char    cdatas[MAX_AXIS];/*bit/byte parameter with axis*/
          short   idatas[MAX_AXIS];/* word parameter with axis */
          long    ldatas[MAX_AXIS];/* 2-word parameter with axis */
          REALPRM rdatas[MAX_AXIS];/* real parameter with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the parameter number.
    See the "PARAMETER MANUAL" of CNC about available parameter number. It can be got by cnc_rdparanum function and cnc_rdparainfo function.

    type
    Specify the attribute of parameter.
    Upper byte:type
    0 : bit type
    1 : byte type
    2 : word type
    3 : 2-word type
    4 : real type
    Lower byte:axis
    0 : no axis
    1,..,m : 1 axis(m=max. controlled axes)
    ALL_AXES : all axes(ALL_AXES=-1)

    rdata, rdatas
    Specify the real parameter.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real parameter = prm_val * 10 ** (-dec_val)

    (Example) When the value of real parameter is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of area to store parameter(length) is wrong.
    EW_NUMBER Data number error
    Parameter number(datano) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_NOOPT No option
    There is no option required for the specified parameter.
    ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )
    EW_PROT Write operation is prohibited.
    EW_PASSWD The parameter of specified range cannot be written because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_wrpitchr

    Writes the pitch error compensation data specified by "datano_s", "datano_e". The data must be stored in "data" array of "IODBPI" with signed binary format.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C/D, Power Mate i
    • Available range of data : -7,..,7

    • Series 15i, 0i-F, 30i, PMi-A
    • Available range of data : -128,..,127


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpitchr(unsigned short FlibHndl, short length, IODBPI *pitch);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length (size of IODBPI structure).

    6+(number of pitch error compensation data)

    IODBPI

    N : Number of pitch error compensation data

    pitch in

    Pointer to the IODBPI structure including the pitch error compensation data. The IODBPI structure is as follows.

    typedef struct  iodbpi {
        short datano_s; /* start number of pitch error data */
        short dummy;    /* (not used) */
        short datano_e; /* end number of pitch error data */
        char  data[N];  /* pitch error compensation data */
    } IODBPI ;          /* N : number of pitch error data */
    
    datano_s
    Specify the start number of the pitch error compensation data.

    datano_e
    Specify the end number of the pitch error compensation data.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPI structure(length) is wrong.
    EW_NUMBER Data number error
    Pitch error compensation data number(datano_s, datano_e) is wrong.
    EW_DATA Data error
    Pitch error compensation data(data) is out of range.
    EW_NOOPT No option
    This function needs the pitch error compensation option.
    EW_PROT Write operation is prohibited. (Series 15)
    CNC is not in the emergency stop.

    ncdata\cnc_wrpmacro

    Writes the P code macro variable (variable for the macro-executor) specified by "number". The data must be stored in "mcr_val","dec_val" with signed binary format.

    It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type.

    • decimal form floating-point type (data format=M*10**(-E))
    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range: 999999999,..,-999999999, integer type:-32768,..,32767)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127, integer type : 0)

    • binary form floating-point type (data format=M*2**(-E))
    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E))
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpmacro(unsigned short FlibHndl, long number, long mcr_val, short dec_val);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the P code macro variable number. See the description of cnc_rdpmacroinfo function about the available range.

    mcr_val in

    Specify the value of variable/numerical part of variable.

    dec_val in

    Specify the number of places of decimals/exponent part of variable.


    ERRORS

    Code Description
    EW_NUMBER Data number error
    P code macro variable number(number) is wrong.
    EW_DATA Data error
    Value of P code macro variable(mcr_val, dec_val) is out of available range.
    EW_NOOPT No option
    This function needs the macro-executor option.
    EW_PASSWD Specified P code macro variable cannot be written because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_wrpmacror

    Writes the P code macro variable (variable for the macro-executor) specified by "datano_s", "datano_e". The data must be stored in "IODBPR" with signed binary format.

    It is possible to exchange the type of P code macro variable by cnc_setpmactype function. In case of the integer type variable, this indication is invalid and always regarded as the decimal form floating-point type.

    • decimal form floating-point type (data format=M*10**(-E))
    • mcr_val : value of variable (=M)
      4-byte binary data with sign
      (available range: 999999999,..,-999999999, integer type:-32768,..,32767)
      dec_val : number of places of decimals (=E)
      2-byte binary data with sign
      (available range:-128,..,127, integer type : 0)

    • binary form floating-point type (data format=M*2**(-E))
    • mcr_val : numerical part of variable (=M)
      4-byte binary data with sign
      (available range:No limitation)
      dec_val : exponent part of variable (=E))
      2-byte binary data with sign
      (available range:-128,..,127)

    The value of an undefined variable is called "vacant", and it is expressed as follows both at decimal form floating-point type and at binary form floating-point type.

    mcr_val = 0
    dec_val = -1

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpmacror(unsigned short FlibHndl, unsigned short length, IODBPR *pmacror);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length (size of IODBPR structure).

    12+8*(Number of P code macro variable)

    IODBPR

    N : Number of P code macro variable

    pmacror in

    Pointer to the IODBPR structure including the P code macro variable. The IODBPR structure is as follows.

    typedef struct iodbpr {
        long  datano_s; /* start P code macro variable number*/
        short dummy;    /* (not used) */
        long  datano_e; /* end P code macro variable number */
        struct {
              long  mcr_val; /* value of P code macro */
              short dec_val; /* number of places of decimals */
        } data[N];           /* N:Number of P code macro variable */
    } IODBPR;
    
    datano_s
    Specify the start P code macro variable number.

    datano_e
    Specify the end P code macro variable number.

    mcr_val
    Specify the value of variable/numerical part of variable.

    dec_val
    Specify the number of places of decimals/exponent part of variable.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPR structure(length) is wrong.
    EW_NUMBER Data number error
    P code macro variable number(datano_s, datano_e) is wrong.
    EW_DATA Data error
    Value of P code macro variable(mcr_val, dec_val) is out of available range.
    EW_NOOPT No option
    This function needs the macro-executor option.
    EW_PASSWD The P code macro variable of specified range cannot be written because the data is protected.
    ( Series 16i/18i/21i, 0i-A/B/C )

    ncdata\cnc_wrpmacror2

    Writes the P code macro variables(variables for the macro-executor) specified by the starting number, "stnum", and number of variables, "*num". The data is stored in "pmacror" with double format. It is not influenced by setting of cnc_setpmactype function.

    The value of an undefined variable is called "vacant", and it is expressed as follows.

    0xFFFFFFFFFFFFFFFF

    See the "PROGRAMING MANUAL" of the macro-executor for details of the P code macro variable.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpmacror2(unsigned short FlibHndl, unsigned long stnum, unsigned long *num, unsigned short type, double *pmacror);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stnum in

    Specify the starting P code macro variable number.
    Please refer to the document of the cnc_rdpmacroinfo2 for the range of variable.

    num in/out

    Specify pointer to the number of P code macro variable.
    The number which was written actually is returned.

    type in Specify the type of macro variables to be written from followings.
    0 : conversation
    1 : auxiliary
    2 : execution
    * This setting is ignored in case of P code macro variables, 10000,..,89999 and the variables for High-speed cycle cutting.
    pmacror in

    Specify the array for written P code macro variables.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of P code macro variables(*num) is 0 or less.
    EW_NUMBER Data number error
    P code macro variable number(stnum) is wrong.
    EW_ATTRIB Data attribute error
    Type of P code macro variables(type) is wrong.
    EW_NOOPT No option
    This function needs the macro-executor option.

    ncdata\cnc_wrrotvolc

    Write the 3-dimensional rotary error compensation data by specified range.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrrotvolc( unsigned short FlibHndl, long start_no, long *num, IODBROTVOLC *rot_data );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    start_no in

    Specify the compensation number which the writing start. The range is 1-7812.

    num in/out

    Specify the writing number. The range is 1-13.
    After the execution of this function, the number of data actually written is returned to *num.

    rot_data in

    Pointer to the area including the 3-dimensional rotary error compensation data.
    The IODBROTVOLC structure is as follows. (Maximum size is rot_data[13].)

    typedef struct iodbrotvolc {
        long   lin[3] ;   /* translational errors[Cx,Cy,Cz]    */
        long   rot[3] ;   /* rotary errors[Cα,Cβ,Cγ] */
    } IODBROTVOLC ;
    

    For example, when 2 data from No.10 is updated, the set data becomes as follows.


    ODBROTVOLC *rot_data ;


    start_no = 10;

    num = 2;


    The 3-dimensional rotary error compensation data is set as follows.


    rot_data[0]->lin[0] Translational error compensation data of 1st axis in No.10.

    rot_data[0]->lin[1] Translational error compensation data of 2nd axis in No.10.

    rot_data[0]->lin[2] Translational error compensation data of 3rd axis in No.10.

    rot_data[0]->rot[0] Rotary error compensation data of 1st axis in No.10.

    rot_data[0]->rot[1] Rotary error compensation data of 2nd axis in No.10.

    rot_data[0]->rot[2] Rotary error compensation data of 3rd axis in No.10.

    rot_data[1]->lin[0] Translational error compensation data of 1st axis in No.11.

    rot_data[1]->lin[1] Translational error compensation data of 2nd axis in No.11.

    rot_data[1]->lin[2] Translational error compensation data of 3rd axis in No.11.

    rot_data[1]->rot[0] Rotary error compensation data of 1st axis in No.11.

    rot_data[1]->rot[1] Rotary error compensation data of 2nd axis in No.11.

    rot_data[1]->rot[2] Rotary error compensation data of 3rd axis in No.11.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Writing start compensation number(start_no) is wrong.
    5 : Writing number(num) is wrong.
    7 : Writing data(lin, rot) is wrong. (Range is not -128-127)
    EW_NOOPT No option
    This function needs the 3-dimensional rotary error compensation and the extended driver/library function option.

    ncdata\cnc_wrset

    Writes the setting data specified by "datano","type"(only for the setting data with axis). The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary.

    Writes the setting data for all axes once by specifying 'ALL_AXES' in 'type'. The setting data for each axis must be stored in each array of "IODBPSD".

    The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function.

    Setting data type Meaning Byte size
    Bit setting data Every bits have each definition. 1
    Bit setting data with axis Every bits have each definition. (each axis) 1
    Byte setting data 1-byte data is stored. 1
    Byte setting data with axis 1-byte data is stored. (each axis) 1
    Word setting data 2-byte data is stored. 2
    Word setting data with axis 2-byte data is stored. (each axis) 2
    2-Word setting data 4-byte data is stored. 4
    2-Word setting data with axis 4-byte data is stored. (each axis) 4
    Real setting data
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real setting data with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to write any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are written at the same time.

    This function is the same as cnc_wrparam function except that it cannot write the parameter without setting attribute.

    See the "PARAMETER MANUAL" of CNC for details of each setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrset(unsigned short FlibHndl, short length, IODBPSD *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of setting data)*(number of axis)

    In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set in

    Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* setting data number */
       short type;                /* axis number */
       union {
          char  cdata;            /* bit/byte setting data */
          short idata;            /* word setting data */
          long  ldata;            /* 2-word setting data */
          char  cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
          short idatas[MAX_AXIS]; /* word setting data with axis */
          long  ldatas[MAX_AXIS]; /* 2-word set. data with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    type
    Specify the attribute of setting data.

    • Series 15, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • Specify the axis number.
      0 : assigns no axis
      1,..,m : assigns 1 axis(m=max. controlled axes)
      ALL_AXES : assigns all axes(ALL_AXES=-1)

    • Series 15i
    • Upper byte:type
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      Lower byte:axis
      0 : no axis
      1,..,m : 1 axis(m=max. controlled axes)
      ALL_AXES : all axes(ALL_AXES=-1)

    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Specify the real setting data.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBPSD structure).

    4+(byte size of setting data)*(number of axis)

    In case that the size of setting data is 4 byte, the IODBPSD structure is as follows. In case that its size is 1, 2, or 8 byte, the size of data part per 1 setting data or 1 axis is 1, 2, or 8 byte.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set in

    Pointer to the IODBPSD structure including the setting data. The IODBPSD structure is as follows.

    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    type
    Specify the attribute of setting data.
      Specify the axis number.
      0 : assigns no axis
      1,..,m : assigns 1 axis(m=max. controlled axes)
      ALL_AXES : assigns all axes(ALL_AXES=-1)

    rdata, rdatas
    Specify the real setting data.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBPSD structure(length) is wrong.
    EW_NUMBER Data number error
    Setting data number(datano) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_NOOPT No option
    There is no option required for the specified setting data.
    ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )

    ncdata\cnc_wrsets

    Writes all setting data stored in "set". The data format depends on each setting data. The format of Byte/Word/2-Word setting data is generally signed binary.

    Writes the setting data for all axes once by specifying 'ALL_AXES' in 'type'. The setting data for each axis must be stored in each array of "IODBPSD".

    The attribute of setting data depends on the type and axis, and it is different for each setting data. It is as follows, and can be got by cnc_rdsetinfo function.

    Setting data type Meaning Byte size
    Bit setting data Every bits have each definition. 1
    Bit setting data with axis Every bits have each definition. (each axis) 1
    Byte setting data 1-byte data is stored. 1
    Byte setting data with axis 1-byte data is stored. (each axis) 1
    Word setting data 2-byte data is stored. 2
    Word setting data with axis 2-byte data is stored. (each axis) 2
    2-Word parameter 4-byte data is stored. 4
    2-Word parameter with axis 4-byte data is stored. (each axis) 4
    Real setting data
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. 8
    Real setting data with axis
    (Series 15i, 30i, 0i-D/F, PMi-A)
    4-byte data which indicates value of variable and 4-byte data which indicates number of places of decimals are stored. (each axis) 8

    It is impossible to write any bit setting data bit by bit. 8 bits(i.e. 1 byte) which belong to the same setting data number are written at the same time.

    This function is the same as cnc_wrparas function except that it cannot write the parameter without setting attribute.

    See the "PARAMETER MANUAL" of CNC for details of each setting data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrsets(unsigned short FlibHndl, short length, void *set);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length which is enough to store the specified setting data.

    The structure per 1 setting data is as follows, and each setting data must be lined up in order of number.

    [= Sum of (4+(byte size of each setting data) *(number of axis))]

    In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary in the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes

      n = Maximum controlled axes

    In case of Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i and PMi-A, the spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set in

    Pointer to the area to store the setting data. Each setting data can be referred by using the IODBPSD structure.

    Series 15, 16/18/21, 16i/18i/21i, 0i-A/B and Power Mate i
    
    typedef struct  iodbpsd {
       short datano;              /* setting data number */
       short type;                /* upper byte:type */
                                  /* lower byte:axis */
       union {
          char  cdata;            /* bit/byte setting data */
          short idata;            /* word setting data */
          long  ldata;            /* 2-word setting data */
          char  cdatas[MAX_AXIS]; /* bit/byte set. data with axis*/
          short idatas[MAX_AXIS]; /* word setting data with axis*/
          long  ldatas[MAX_AXIS]; /* 2-word set. data with axis */
       } u ;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    Series 15i, 30i, 0i-D/F, PMi-A and Ethernet connection
    
    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    type
    Specify the attribute of setting data.

      Upper byte:type
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type(Series 15i, 30i, 0i-D/F, PMi-A)
      Lower byte:axis
      0 : assigns no axis
      1,..,m : assigns 1 axis(m=max. controlled axes)
      ALL_AXES : assigns all axes(ALL_AXES=-1)

    rdata, rdatas ( Series 15i, 30i, 0i-D/F, PMi-A )
    Specify the real setting data.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length which is enough to store the specified setting data.

    The structure per 1 setting data is as follows, and each setting data must be lined up in order of number.

    [= Sum of (4+(byte size of each setting data) *(number of axis))]

    In case that the size of setting data is 2 byte, the IODBPSD structure is as follows. In case that the size of setting data is 1 or 2 byte and the length per 1 setting data is not a multiple of 4, 'dummy' is necessary in the end of structure. In case that its size is 4 or 8 byte, the size of data part per 1 setting data or 1 axis is 4 or 8 byte, and so 'dummy' is not necessary.

    IODBPSD

    no axis/1 axis all axes
    n = Maximum controlled axes

    The spindle setting data has an axis attribute, and the data for number of spindle are valid.

    set in

    Pointer to the area to store the setting data. Each setting data can be referred by using the IODBPSD structure.

    typedef struct realprm {     /* real setting data */
       long prm_val;             /* value of variable */
       long dec_val;             /* number of places of decimals */
    } REALPRM;
    
    typedef struct  iodbpsd {
       short datano;               /* setting data number */
       short type;                 /* upper byte:type */
                                   /* lower byte:axis */
       union {
          char    cdata;           /* bit/byte setting data */
          short   idata;           /* word setting data */
          long    ldata;           /* 2-word setting data */
          REALPRM rdata;           /* real setting data */
          char    cdatas[MAX_AXIS];/*bit/byte set. data with axis*/
          short   idatas[MAX_AXIS];/* word set. data with axis */
          long    ldatas[MAX_AXIS];/* 2-word set. data with axis */
          REALPRM rdatas[MAX_AXIS];/* real set. data with axis */
       } u;
    } IODBPSD ;               /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the setting data number.
    See the "PARAMETER MANUAL" of CNC about available setting data number. It can be got by cnc_rdsetnum function and cnc_rdsetinfo function.

    type
    Specify the attribute of setting data.

      Upper byte:type
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      Lower byte:axis
      0 : assigns no axis
      1,..,m : assigns 1 axis(m=max controlled axes)
      ALL_AXES : assigns all axes(ALL_AXES=-1)

    rdata, rdatas
    Specify the real setting data.
    Specify the value of variable in prm_val, and specify the number of places of decimals in dec_val.

    Real setting data = prm_val * 10 ** (-dec_val)

    (Example) When the value of real setting data is 12.345, prm_val and dec_val are read as follows.

    prm_val = 12345
    dec_val = 3


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of area to store setting data(length) is wrong.
    EW_NUMBER Data number error
    Setting data number(datano) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_NOOPT No option
    There is no option required for the specified setting data.
    ( Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i )

    ncdata\cnc_wrtofs

    Writes the tool offset value specified by "number", "type". The offset value must be stored in "data" with signed binary format.

    The unit of offset value is as follows.

    • Series 15
    • 6007#0
      (ONM)
      6004#0
      (OUF)
      6002#1
      (OFN)
      6002#0
      (ORG)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001

    • Series 15i
    • 6007#0
      (OFE)
      6004#0
      (OFD)
      6002#1
      (OFC)
      6002#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001
      IS-A is effective for Power Mate i-H.
      IS-C is effective for Power Mate i-D.

    • Series 0i-D/F, PMi-A
    • 5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 1 0.01 0.001 0.01
      0 0 0.001 0.0001 0.001
      1 0 0.0001 0.00001 0.0001

    • Series 30i
    • 5042#3
      (OFE)
      5042#2
      (OFD)
      5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 0.01 0.001 0.01
      0 0 0 0 0.001 0.0001 0.001
      0 0 1 0 0.0001 0.00001 0.0001
      0 1 0 0 0.00001 0.000001 0.00001
      1 0 0 0 0.000001 0.0000001 0.000001

    The available range of offset value is as follows.

    • Series 15
    • 6007#0
      (ONM)
      6004#0
      (OUF)
      6002#1
      (OFN)
      6002#0
      (ORG)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 ± 999.99
      (±9999.99)
      ± 99.999
      (±999.999)
      ± 999.99
      (±9999.99)
      0 0 0 0 ± 999.999
      (±9999.999)
      ± 99.9999
      (±999.9999)
      ± 999.999
      (±9999.999)
      0 0 1 0 ± 999.9999
      (±9999.9999)
      ± 99.99999
      (±999.99999)
      ± 999.9999
      (±9999.9999)
      0 1 0 0 ± 99.99999
      (±9999.99999)
      ± 9.999999
      (±999.999999)
      ± 99.99999
      (±9999.99999)
      1 0 0 0 ± 9.999999
      (±999.999999)
      ± 0.9999999
      (±99.9999999)
      ± 9.999999
      (±999.999999)
      * () : Extended tool offset value option

    • Series 15i
    • 6007#0
      (OFE)
      6004#0
      (OFD)
      6002#1
      (OFC)
      6002#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 ±9999.99 ±999.999 ±9999.99
      0 0 0 0 ±9999.999 ±999.9999 ±9999.999
      0 0 1 0 ±9999.9999 ±999.99999 ±9999.9999
      0 1 0 0 ±9999.99999 ±999.999999 ±9999.99999
      1 0 0 0 ± 999.999999 ± 99.9999999 ± 999.999999

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 ± 999.99
      (± 99.99)
      ± 99.999
      (± 9.999)
      ± 999.99
      (± 99.99)
      IS-B 0 0 ± 999.999
      (± 99.999)
      ± 99.9999
      (± 9.9999)
      ± 999.999
      (± 99.999)
      IS-C 1 0 ± 999.9999
      (± 99.9999)
      ± 99.99999
      (± 9.99999)
      ± 999.9999
      (± 99.9999)
      * () : Wear offset
      IS-A is effective for Power Mate i-H.
      IS-C is effective for Power Mate i-D.

    • Series 0i-D/F, PMi-A
    • 5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 1 ±9999.99 ±999.999 ±9999.99
      0 0 ±9999.999 ±999.9999 ±9999.999
      1 0 ±9999.9999 ±999.99999 ±9999.9999

    • Series 30i
    • 5042#3
      (OFE)
      5042#2
      (OFD)
      5042#1
      (OFC)
      5042#0
      (OFA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      0 0 0 1 ±9999.99 ±999.999 ±9999.99
      0 0 0 0 ±9999.999 ±999.9999 ±9999.999
      0 0 1 0 ±9999.9999 ±999.99999 ±9999.9999
      0 1 0 0 ±9999.99999 ±999.999999 ±9999.99999
      1 0 0 0 ±999.999999 ±99.9999999 ±999.999999


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtofs(unsigned short FlibHndl, short number, short type, short length, long data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool offset number.
    The available number of tool offset can be got by cnc_rdtofsinfo function.

    type in

    Specify the tool offset type. (see the following table)

    • Machining Center Series (M series, including Power Mate i, PMi-A)
    • Cutter radius Tool length
      Wear 0 2
      Geometry 1 3
      Specify "cutter radius" in case of no distinction of cutter radius/tool length, and "wear" in case of no distinction of wear/geometry.

    • Machining Center Series (M series, Series 30i)
    • Cutter radius Tool length Imaginary tool nose Corner R
      Wear 0 2 6 10
      Geometry 1 3 7 11
      Specify "cutter radius" in case of no distinction of cutter radius/tool length, and "wear" in case of no distinction of wear/geometry.

    • Lathe Series (T series)
    • X axis Z axis Nose R Imaginary tool nose Y axis 4th axis 5th axis
      Wear 0 2 4 6 8 30 32
      Geometry 1 3 5 7 9 31 33
      2nd coord Ware(Series 30i) 15 17 19 21 23 -- --
      2nd coord Geometry(Series 30i) 16 18 20 22 24 -- --
      Specify "wear" in case of no distinction of wear/geometry.

    • Lathe Series (T series, second geometry offset, Series 30i)
    • X axis Z axis Y axis
      Geometry 100 101 102
      2nd coord Geometry 110 111 112

      When the tool offset for milling and turning function option is effective, specify the following type.(Series 30i)
    • Machining Center Series
    • X axis Tool length Cutter radius Imaginary tool nose Y axis Corner R
      Wear 0 2 4 6 8 10
      Geometry 1 3 5 7 9 11

    • Lathe Series (T series)
    • X axis Z axis Nose R Imaginary tool nose Y axis
      Wear 0 2 4 6 8
      Geometry 1 3 5 7 9
      The tool offset for milling and turning function and the changing active offset value with manual move function can not specify at same time. So, the wear and geometry offset for 2nd coordinate are not exist.

    • Lathe Series/second geometry offset
    • X axis Z axis Y axis
      Geometry 100 101 102
      The tool offset for milling and turning function and the changing active offset value with manual move function can not specify at same time. So, the geometry offset for 2nd coordinate are not exist.

    length in

    Specify 8.

    data in

    Set the tool offset value.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size (length) is not 8.
    EW_NUMBER Data number error
    Offset number (number) is wrong.
    EW_ATTRIB Data Type error
    Offset type (type) is wrong.
    EW_ALARM Data error
    Offset data is out of range of the wrong operation prevention functions.
    EW_DATA Data error (Series 15)
    Offset data (data) is out of range.

    ncdata\cnc_wrtofsr

    Writes the tool offset value specified by "datano_s","datano_e","type". The offset value must be stored in "IODBTO" with signed binary format.

    The unit of offset value is the same as "Write tool offset value(cnc_wrtofs)". See the description of cnc_wrtofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtofsr(unsigned short FlibHndl, short length, IODBTO *tofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length.

    tofsr in

    Pointer to the IODBTO structure including the tool offset value. The IODBTO structure is as follows.

    typedef struct iodbto {
        short datano_s;             /* start offset number */
        short type;                 /* offset type */
        short datano_e;             /* end offset number */
        union {
            long    m_ofs[N];       /* M series individual */
            long    m_ofs_a[N];     /* M series Memory A all */
            long    m_ofs_b[2*N];   /* M series Memory B all */
            long    m_ofs_c[4*N];   /* M series Memory C all */
            struct  {
                short   tip ;
                long    data[1] ;
            } m_ofs_at[N] ;         /* M series Memory A all with direction of imaginary tool nose */
            struct  {
                short   tip ;
                long    data[2] ;
            } m_ofs_bt[N] ;         /* M series Memory B all with direction of imaginary tool nose */
            struct  {
                short   tip ;
                long    data[4] ;
            } m_ofs_ct[N] ;         /* M series Memory C all with direction of imaginary tool nose */
            short   t_tip[N];       /* T series individual,direction of imaginary tool nose */
            long    t_ofs[N];       /* T series individual */
            struct  {
                short   tip;
                long    data[4];
            } t_ofs_a[N];           /* T series Memory A all */
            struct {
                short   tip;
                long    data[8];
            } t_ofs_b[N];           /* T series Memory B all */
            long    t_ofs_2g[3*N];  /* T series Second geometry all */
            long    m_ofs_cnr[10];  /* M-CornerR */
            struct  {
                long    data[2];
            } t_ofs_ex[N];          /* T series 4th/5th Axis Offset Function all */
        } u ;
    } IODBTO ;      /* N is number of the offset value. */
    
    datano_s
    Specify the start tool offset number.
    The available number of tool offset can be got by cnc_rdtofsinfo function.
    datano_e
    Specify the end tool offset number.
    type
    Specify the tool offset type.

    The combinations of the value specified in "type", the data block length "length", the kind of offset value to be written and the member in which the offset value must be stored are the same as "Read tool offset value(area specified)(cnc_rdtofsr)". See the description of cnc_rdtofsr function.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of ODBTOFS structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(datano_s,datano_e) is wrong.
    EW_ATTRIB Data attribute error
    Offset type(type) is wrong.
    EW_ALARM Data error
    Offset data is out of range of the wrong operation prevention functions.
    EW_DATA Data error (Series 15)
    Offset data(data,etc.) is out of range.

    ncdata\cnc_wrvolc

    Writes the 3-dimensional error compensation data by specified range.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrvolc(unsigned short FlibHndl,ODBVOLC *volc, long *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    volc in

    Pointer to the ODBTOFS structure including the writing information of 3-dimensional error compensation data. The ODBVOLC structure is as follows.

    typedef struct odbvolc {
        long   start_no ;  /* Writing start compensation number */
        long   start_ax ;  /* Writing start axis index */
        long   end_no ;    /* Writing end compensation number */
        long   end_ax ;    /* Writing end axis index */
        long   num ;       /* Writing number */
        char   type ;      /* 0:Write by number  1:Write by end number specification */
        long   data[72] ;  /* Reserved */
    } ODBVOLC ;
    
    start_no
    Specify the compensation number which the writing start.
    The range is 1-15625.
    start_ax
    Specify the axis index number which the writing start.
    The range is 1-3.
    end_no
    Specify the compensation number which the writing end. This argument is effective at type=1.
    The range is 1-15625.
    end_ax
    Specify the axis index number which the writing end. This argument is effective at type=1.
    The range is 1-3.
    num
    Specify the writing number. This argument is effective at type=0.
    The range is 1-78.
    type
    Specify the writing method type.
    0 : Write by number(Specify the "num")
    1 : Write by end number specification(Specify the "end_no","end_ax")

    When type=1 is specified for the writing method type, specify the other argument to become the following.

    1 <= ((end_no - start_no) * 3 + (end_ax - start_ax) + 1) <= 78

    data in

    Pointer to the area including the 3-dimensional error compensation data. The number of maximum data which can write is 78.

    (Maximum size is data[78].) The range of compensation data is -128 to 127.

    Data is stored in order of the 1st axis, 2nd axis and the 3rd axis from the little number.

    For example, when the data from the 2nd axis in No.3 to the 1st axis in No.8 is updated by the end number specification, the set data becomes as follows.


    ODBVOLC volc ;

    long data[78] ;


    volc.start_no = 3

    volc.start_ax = 2

    volc.end_no = 10

    volc.end_ax = 1

    volc.type = 1(end number specification)


    data[0] 3-dimensional error compensation data of 2nd axis in No.3.
    data[1] 3-dimensional error compensation data of 3rd axis in No.3.
    data[2] 3-dimensional error compensation data of 1st axis in No.4.
    :
    data[19] 3-dimensional error compensation data of 3rd axis in No.9.
    data[20] 3-dimensional error compensation data of 1st axis in No.10.

    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : 3-dimensional error compensation data(data) is worng.
    1 : Writing start compensation number(start_no) is wrong.
    2 : Writing start axis index number(start_ax) is wrong.
    3 : Writing end compensation number(end_no) is wrong.
    4 : Writing end axis index number(end_ax) is wrong.
    5 : Writing number(num) is wrong.
    6 : Writing type(type) is wrong.
    7 : Writing data(data) error.(out of range(-128 from 127))
    EW_NOOPT No option
    This function needs the 3-dimensional error compensation and the extended driver/library function option.

    ncdata\cnc_wrwkcdsfms

    Writes the work coordinate shift measured value specified by "type". The work coordinate shift measured value must be stored in "data" array of "IODBWCSF" with signed binary format. The value for all axes can be written at a time by specifying ALL_AXES for "type".

    The unit of work coordinate shift measured value is the same as "Read work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrwkcdsfms(unsigned short FlibHndl, short length, IODBWCSF *wkcdsfms);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBWCSF structure).

    IODBWCSF

    1 axis all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    • Series 30i, 0i-D/F
    • n = Maximum controlled axes (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • n = Current controlled axes

    wkcdsfms in

    Pointer to the IODBWCSF structure for the work coordinate shift measured value. The IODBWCSF structure is as follows.

    typedef struct iodbwcsf {
            short   dummy;         /* (not used)               */
            short   type;          /* axis number              */
            long    data[MAX_AXIS];/* work coordinate shift    */
                                   /*           measured value */
    } IODBWCSF ;            /* MAX_AXIS : max. controlled axes */
    
    type
    Specify the axis number.
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)
    data
    Specify the work coordinate shift measured value to be written.
    data[0],..,data[m-1] : assigns all axes
    data[0] : 1assigns all axes

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBWCSF structure(length) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_DATA Data error
    Work coordinate shift measured value(data) is out of range.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    CNC parameter '3290#3' must be 0.
    EW_PARAM CNC parameter error
    CNC parameter '1201#6' must be 0.
    EW_REJECT CNC execution rejected
    STL(DO) is on.

    ncdata\cnc_wrwkcdshft

    Writes the work coordinate shift value specified by "type". The work coordinate shift value must be stored in "data" array of "IODBWCSF" with signed binary format. The value for all axes can be written at a time by specifying ALL_AXES for "type".

    The unit of work coordinate shift value is the same as "Read work coordinate shift value( cnc_rdwkcdshft )". See the description of cnc_rdwkcdshft function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrwkcdshft(unsigned short FlibHndl, short length, IODBWCSF *wkcdshft);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBWCSF structure).

    IODBWCSF

    1 axis all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    • Series 30i, 0i-D/F
    • n = Maximum controlled axes (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • n = Current controlled axes

    wkcdshft in

    Pointer to the IODBWCSF structure for the work coordinate shift value. The IODBWCSF structure is as follows.

    typedef struct iodbwcsf {
            short   dummy;         /* (not used)                 */
            short   type;          /* axis number                */
            long    data[MAX_AXIS];/* work coordinate shift value*/
    } IODBWCSF ;              /* MAX_AXIS : max. controlled axes */
    
    type
    Specify the axis number.
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)
    data
    Specify the work coordinate shift value to be written.
    data[0],..,data[m-1] : assigns all axes
    data[0] : assigns 1 axis

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used at M series.
    EW_LENGTH Data block length error
    Size of IODBWCSF structure(length) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_DATA Data error
    Work coordinate shift value(data) is out of range.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection
    CNC parameter '3290#3' must be 0.
    EW_PARAM CNC parameter error
    CNC parameter '1201#6' must be 0.
    EW_REJECT CNC execution rejected
    STL(DO) is on.

    ncdata\cnc_wrzofs

    Writes the work zero offset value specified by "datano", "type". The offset value must be stored in "data[0]" of "IODBZOFS" with signed binary format.

    Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'. The offset value for each axis must be stored in "data" array of "IODBZOFS".

    The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)". See the description of cnc_rdzofs function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrzofs(unsigned short FlibHndl, short length, IODBZOFS *zofs);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBZOFS structure).

    IODBZOFS

    1 axis all axes
    • Series 15/15i, 30i, 0i-D/F
    • n = Maximum controlled axes (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    zofs in

    Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.

    typedef struct iodbzofs {
        short   datano;         /* offset number */
        short   type;           /* axis number */
        long    data[MAX_AXIS]; /* offset data value */
    } IODBZOFS ;       /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the work zero offset number.

    • Series 15/15i, 0i-D
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,54 : Work zero offset value of G54.1P1 through G54.1P48
    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • M Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
      T Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
    • Series 0i-F, 30i
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
    type
    Specify the axis number.
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBZOFS structure).

    IODBZOFS

    1 axis all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    zofs in

    Pointer to the IODBZOFS structure including the work zero offset value. The IODBZOFS structure is as follows.

    typedef struct iodbzofs {
        short   datano;         /* offset number */
        short   type;           /* axis number */
        long    data[MAX_AXIS]; /* offset data value */
    } IODBZOFS ;       /* MAX_AXIS : max. controlled axes */
    
    datano
    Specify the work zero offset number.

    0 : External work zero offset value
    1,..,6 : Work zero offset value of G54 through G59
    7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
    type
    Specify the axis number.
    ALL_AXES : assigns all axes(ALL_AXES=-1)
    1,..,m : assigns 1 axis(m=current controlled axes)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBZOFS structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(datano) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_DATA Data error (Series 15, 30i, 0i-D/F)
    Offset data(data) is out of range.
    EW_NOOPT No option (Series 16/18/21, 16i/18i/21i, 0i, 30i)
    This function needs the work zero offset option.

    ncdata\cnc_wrzofsr

    Writes the work zero offset value specified by "datano_s", "datano_e", "type". The offset value must be stored in "data" array of "IODBZOR" with signed binary format.
    Writes the offset value for all axes once by specifying 'ALL_AXES' in 'type'.

    The unit of offset value is the same as "Read work zero offset value(cnc_rdzofs)". See the description of cnc_rdzofs function.

    As for Series 16i/18i-W, the unit of offset value is as follows.

    • Series 16i/18i-W
    • 1004#1
      (ISC)
      1004#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      Rotation axis

      [deg]
      IS-A 0 1 0.01 0.001 0.01
      IS-B 0 0 0.001 0.0001 0.001
      IS-C 1 0 0.0001 0.00001 0.0001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrzofsr(unsigned short FlibHndl, short length, IODBZOR *zofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBZOR structure).
    (8+4*(number of axes)*(number of offset))

    IODBZOR

    1 axis all axes

    n = Maximum controlled axes (* The data for current controlled axes are valid.)
    K = Number of offset to be written

    zofsr in

    Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
        short   datano_s;        /* start offset number  */
        short   type;            /* axis number          */
        short   datano_e;        /* end offset number    */
        long    data[MAX_AXIS*K];/* offset data value    */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes */
                      /* K : number of offset  */
    
    datano_s
    Specify the start work zero offset number.

    • Series 15/15i, 0i-D
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,54 : Work zero offset value of G54.1P1 through G54.1P48

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • M Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
      T Series 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59

    • Series 0i-F, 30i
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300

    • Series 16i/18i-W
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59

    datano_e
    Specify the end work zero offset number.

    type
    Specify the axis number.

    ALL_AXES : assigns all axes (ALL_AXES=-1)
    1,..,m : assigns 1 axis (m=current controlled axes)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBZOR structure).
    (8+4*(number of axes)*(number of offset))

    IODBZOR

    1 axis all axes
    n = Maximum controlled axes (* The data for current controlled axes are valid.)
    K = Number of offset to be written
    zofsr in

    Pointer to the IODBZOR structure including the work zero offset value. The IODBZOR structure is as follows.

    typedef struct  iodbzor {
        short   datano_s;        /* start offset number  */
        short   type;            /* axis number          */
        short   datano_e;        /* end offset number    */
        long    data[MAX_AXIS*K];/* offset data value    */
    } IODBZOR ;       /* MAX_AXIS : max. controlled axes */
                      /* K : number of offset  */
    
    datano_s
    Specify the start work zero offset number.
      0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300

    datano_e
    Specify the end work zero offset number.

    type
    Specify the axis number.

    ALL_AXES : assigns all axes (ALL_AXES=-1)
    1,..,m : assigns 1 axis (m=current controlled axes)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBZOR structure(length) is wrong.
    EW_NUMBER Data number error
    Offset number(datano_s, datano_e) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(type) is wrong.
    EW_DATA Data error (Series 15, 0i-F, 30i)
    Offset data(data) is out of range.
    EW_NOOPT No option (Series 16/18/21, 16i/18i/21i, 0i, 30i)
    This function needs the work zero offset option.

    ncdata\cnc_zofs_rnge

    Reads the effective setting range of work zero offset value specified by "number", "axis".
    The effective setting range is stored in "data_min", "data_max" of ODBDATRNG with signed binary format.

    The unit of offset value is as follows.

    • Series 30i
    • 1013#3
      (ISE)
      1013#2
      (ISD)
      1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      IS-A 0 0 0 1 0.01 0.001
      IS-B 0 0 0 0 0.001 0.0001
      IS-C 0 0 1 0 0.0001 0.00001
      IS-D 0 1 0 0 0.00001 0.000001
      IS-E 1 0 0 0 0.000001 0.0000001

    • Series 0i-D/F
    • 1013#1
      (ISC)
      1013#0
      (ISA)
      Linear axis
      mm input
      [mm]
      Linear axis
      inch input
      [inch]
      IS-A 0 1 0.01 0.001
      IS-B 0 0 0.001 0.0001
      IS-C 1 0 0.0001 0.00001


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_zofs_rnge(unsigned short FlibHndl,short number, short axis,ODBDATRNG *zofsr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the work zero offset number.

    • Series 0i-F, 30i
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,306 : Work zero offset value of G54.1P1 through G54.1P300
    • Series 0i-D
    • 0 : External work zero offset value
      1,..,6 : Work zero offset value of G54 through G59
      7,..,54 : Work zero offset value of G54.1P1 through G54.1P48
    axis in

    Specify the axis number to be read.

      1,..,m : assigns 1 axis(m=current controlled axes)
    zofsr out

    Specify the pointer of the ODBDATRNG structure that stores the upper and lower limit of work zero offset value. The ODBDATRNG structure is as follows.

    typedef struct odbdatrng {
        long    data_min ;   /* lower limit */
        long    data_max ;   /* upper limit */
        long    status;      /* status of setting value */
    } ODBDATRNG ;
    
    data_min
    lower limit of effective setting range

    data_max
    upper limit of effective setting range

    status
    status of setting value
    0 : in-range of effective setting range
    1 : out-range of effective setting range


    ERRORS

    Code Description
    EW_NUMBER Data number error
    Offset number(number) is wrong.
    EW_ATTRIB Data attribute error
    Axis number(axis) is wrong.
    EW_NOOPT No option
    This function needs the work zero offset option.
    EW_DATA Effective setting range cannot be acquired
    In order to get more information for this return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : error other than EW_DATA
    1 : setting of input data range check is void
    2 : setting of input data range check is wrong
    (upper or lower limit is invalid)
    3 : setting of input data range check is wrong
    (offset number overlaps with others)

    pmc\pmc_crdmsg

    Reads the data of 32 bytes transmitted from the PMC.
    It is necessary to transmit the data on the PMC side to read the data.
    If the data is not transmitted from the PMC, the error(Return: EW_BUFFER) is returned.
    The data is stored in the data array.
    The meaning of the data can be decided by the each application of the PMC and the MMC.

    The outline of each processing is as follows.

    Note) When the MMC side processing is late, the completion status on the PMC side is <-10>.
    See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_crdmsg(unsigned short FlibHndl, short *length,short *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in/out

    Specify the pointer to the reception data length.
    The data length actually received is returned.

    data out

    Specify the pointer to the reception data storage area.
    The array is as follows.

    short data[16] ;

    Note) The order of the data changes places on the MMC side and the PMC side as the following figure in case of PMC-NA.


    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_BUFFER The buffer is empty.
    The PMC side does not transmit the data or the transmission processing is late, therefore the data cannot be received.

    pmc\pmc_cwrmsg

    Writes the data of 32 bytes transmitted to the PMC.
    It is necessary to receive the data on the PMC side to write the data.
    If the PMC side does not receive the data, the error(Return:EW_BUFFER) is returned.
    The data must be stored in the data array.
    The meaning of the data can be decided by the each application of the PMC and the MMC.

    The outline of each processing is as follows.

    Note) When the MMC side processing is late, the completion status on the PMC side is <-10>.
    See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_cwrmsg(unsigned short FlibHndl, short length,short *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in

    Specify the data block length of the transmission data.

    data in

    Specify the pointer to the transmission data storage area.
    The array is as follows.

    short data[16] ;

    Note) The order of the data changes places on the MMC side and the PMC side as the following figure in case of PMC-NA.


    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Data length(length) is wrong.
    EW_BUFFER The buffer is full.
    The PMC side does not receive the data or the reception processing is late, therefore the data cannot be transmitted.

    pmc\pmc_get_current_pmc_unit

    Get the current PMC unit type.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_get_current_pmc_unit ( unsigned short FlibHndl, long * unittype );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    unittype out Gets the PMC unit type that is currently selected as the target of other PMC FOCAS2 functions.

    Value Unit type
    PMCUNIT_PMC1 (1) 1st PMC
    PMCUNIT_PMC2 (2) 2nd PMC
    PMCUNIT_PMC3 (3) 3rd PMC
    PMCUNIT_PMC4 (4) 4th PMC
    PMCUNIT_PMC5 (5) 5th PMC
    PMCUNIT_DCS (9) Dual-check safety PMC

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.

    pmc\pmc_get_number_of_pmc

    Reads the number of existing PMC paths (i.e. number of unit).


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_get_number_of_pmc ( unsigned short FlibHndl, long * number );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number out Specify the pointer that stores the number of PMC paths.

    ERRORS

    Code Description

    pmc\pmc_get_pmc_unit_types

    Reads the PMC system information that shows what kind of PMC units compose the multi-path PMC system.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_get_pmc_unit_types ( unsigned short FlibHndl, long unittypes[], long * count );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    unittypes out Specify the pointer to an array of "long" where the "Unit Type" of each PMC path will be stored.
    The maximum number of PMC paths is 6, and the actual number of PMC paths can be got by pmc_get_number_of_pmc. Each element of the array shows the "Unit Type" of the PMC path as following values.

    Value Unit type
    0 PMC not exists
    PMCUNIT_PMC1 (1) 1st PMC
    PMCUNIT_PMC2 (2) 2nd PMC
    PMCUNIT_PMC3 (3) 3rd PMC
    PMCUNIT_PMC4 (4) 4th PMC
    PMCUNIT_PMC5 (5) 5th PMC
    PMCUNIT_DCS (9) Dual-check safety PMC

    The PMC unit type can be got from this array by using the PMC path number as the index.
    count in/out Specify the pointer where the number of elements of unittypes[] is stored.
    Before calling this function, set the element number of the array, unittypes[], where this pointer shows. This function returns the number of elements (number of PMC paths) that is actually got, storing to this pointer.

    ERRORS

    Code Description

    pmc\pmc_get_timer_type

    Reads the PMC timer type of the specified timer number.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_get_timer_type(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, short *type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start PMC timer number(1-250).

    e_no in

    Specify the end PMC timer number(1-250).

    type out Specify the address of the array to store the timer type.
    The timer type is as follows.
    0 : Initial value
    1 : 1msec
    2 : 10msec
    3 : 100msec
    4 : 1sec
    5 : 1min
    Initial value (0) is as follows by the timer number.
    No.1 - No.8 : 48msec
    No.9 - No.250 : 8msec

    ERRORS

    Code Description
    EW_RANGE Timer number error
    PMC timer number(s_no, e_no) is wrong.

    pmc\pmc_getdtailerr

    Gets the detailed error information after the function has been executed.

    The detailed error information is stored in "err_no", "err_dtno" of "ODBPMCERR".


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_getdtailerr(unsigned short FlibHndl, ODBPMCERR *err);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    err out Pointer to the ODBPMCERR structure to set the detailed error information.
    The ODBPMCERR structure is as follows.
    typedef struct odbpmcerr{
        short   err_no;         /* Detail error */
        short   err_dtno;       /* Data number on error */
    } ODBPMCERR ;
    

    ERRORS

    Code Description

    pmc\pmc_kpmsiz

    Reads the maximum size of the extended backup memory.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_kpmsiz(unsigned short FlibHndl, unsigned long *size);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    size out Pointer to the maximum size storage area.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_NOOPT No option
    This function needs the extended backup memory option.

    pmc\pmc_rdalmmsg

    Reads the alarm messages from PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdalmmsg(unsigned short FlibHndl, short s_number, short *read_num, short *exist, ODBPMCALM *pmcalm);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_number in Specify the starting number(=1,2,3..) from which PMC alarm messages is read.
    read_num in/out Pointer to the number of alarm messages to be read.
    Specify the number of alarm messages to be read before function call and actual number of alarm messages being read is stored after the function call.
    exist out When 'read_num' is specified less than the actual number of PMC alarms occurred on PMC side, '1' is returned.
    -1 : There is no alarm.
    0 : All alarms were read.
    1 : Alarm still exists.

    If the alarm still exists, it is possible to read the remained PMC alarms by setting "s_number = s_number + read_num" and calling this function again.
    pmcalm out Pointer to the array of ODBPMCALM structure where returned data are stored.
    The number of array must be required so as to store the PMC alarms specified by 'read_num'.
    The ODBPMCALM structure is as follows.
    Type MyODBPMCALM
        nOdb_pmcalm(0 To 9) As ODBPMCALM
    End Type ' In case that the read_num is 10.
    
    almmsg
    Alarm message character string is set.
    The message is terminated with NULL('\0').
    The alarm messages are described in "fwpmcalm.ini".(except 30i, 0i-D/F, PMi-A)
    Customized alarm messages can be acquired by modifying the messages in "fwpmcalm.ini" file.

    Please copy "fwpmcalm.ini" onto the application folder or Windows system folder.
    When this file does not exist there, this function outputs the internal default messages.
    Series 30i, 0i-D/F and PMi-A does not use "fwpmcalm.ini" file.
    "fwpmcalm.ini" file format is as follows.
    [Section]
    Key = "Alarm message strings"

    Section
    PMC-NA : indicates the following messages are for PMC-NA.
    OTHERS : indicates the following messages are for other PMCs than PMC-NA.
    Key
    Key is defined as the next format.
    In case of error message : ERxx (xx is error number)
    In case of warning message : WNxx (xx is warning number)
    When the same message numbers exist, '_x' (x=1,2,...) is attached to the key.
    Alarm message strings
    An arbitrary character string can be specified up to 128 characters (NULL as the terminator is included).
    The ';' cannot be used in the character string.
    Moreover, the '%02d'(For the decimal number) and the '%02x'(For the hexadecimal number) are described into the messages which show the group number, etc..

    Example :
    [OTHERS]
    ER01 = "ER01 PROGRAM DATA ERROR"
    ER35_1 = "ER35 TOO MUCH OUTPUT DATA IN GROUP(%02d)"
    WN01 = "WN01 LADDER MAX SIZE ERROR"

    Notes for modifying "fwpmcalm.ini" file
    1) Please do not modify the Section, PMC-NA, OTHERS, and the Key themselves.
    2) A Key and corresponding message can be deleted.
    When a Key and corresponding message are deleted, the fixed message which this function holds internally is acquired.
    3) The modifying of alarm messages is possible, but the new Key cannot be added.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_NUMBER data number error
    The specification of the starting number (s_number) is wrong.
    EW_DATA data error
    data(read_num) is out of range.

    pmc\pmc_rdcntldata

    Reads the control data to manage PMC data table (address D).

    This function is not available at PMC-NA.

    Refer to the programming manual of PMC(ladder language) concerning the details of output arguments.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdcntldata(unsigned short FlibHndl, short s_number, short e_number, short length, IODBPMCCNTL *pmccntl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in Specify the start group number.
    e_number in Specify the end group number.
    length in

    Specify the length of data block.
    (size of IODBPMCCNTL structure)

    IODBPMCCNTL


    N is the number of group to be read.
    pmccntl out Pointer to the IODBPMCCNTL structure including the control data of PMC data table.
    The IODBPMCCNTL structure is as follows.
    typedef struct iodbpmccntl {
        short   datano_s ;      /* start group number */
        short   dummy ;         /* (not used) */
        short   datano_e ;      /* end group number */
        struct {
            char    tbl_prm ; /* table parameter */
            char    data_type ;     /* data type */
            unsigned short  data_size ;
                                /* size of data in group */
            unsigned short  data_dsp ;
                            /* address of data in group */
            short   dummy ; /* (not used) */
        } info[N] ;     /* N : number of messages to be read */
    } IODBPMCCNTL ;
    
    datano_s
    Start group number
    datano_e
    End group number
    tbl_prm
    Table parameter
    bit 0 : Format of data table
    0 : binary
    1 : BCD
    bit 1 : Protection of data table
    0 : not protected
    1 : protected
    bit 2 : Format of data table
    0 : binary or BCD
    1 : hexadecimal
    bit 3,..,7 : (not used)
    data_type
    Data type(0:BYTE,1:WORD,2:LONG,3:BIT,4:REAL,5:LREAL)
    data_size
    Size of data in group(number of byte)
    data_dsp
    Address of data in group(address D inside)

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBPMCCNTL structure(length) is wrong.
    EW_NUMBER data number error
    Group number(s_number,e_number) is wrong.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    pmc\pmc_rdcntlgrp

    Reads the total number of groups of the control data to manage PMC data table(address D).

    This function is not available at PMC-NA.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdcntlgrp(unsigned short FlibHndl, short *grp_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no out Specify the address of the variable to store the total number of groups.
    After executing this function, the number of group which was read actually is set.

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.

    pmc\pmc_rdkpm

    Reads the contents of the extended backup memory of PMC specified by "offset", "length".
    The data are stored in "data" with the same format with PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdkpm(unsigned short FlibHndl, unsigned long offset,char *data,unsigned short length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    offset in Specify the start address.
    The top of the extended backup memory is indicated by '0'.
    data out Pointer to the data storage area.
    The array is as follows.

    char data[65535] ;
    length in Specify the size of data to be read.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of data(length) is wrong.
    EW_RANGE Address range error
    Start address(offset) is wrong.
    EW_NOOPT No option
    This function needs the extended backup memory option.

    pmc\pmc_rdkpm2

    Reads the contents of the extended backup memory of PMC specified by "offset", "length".
    The data are stored in "data" with the same format with PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdkpm2(unsigned short FlibHndl, unsigned long offset,char *data,unsigned long length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    offset in Specify the start address.
    The top of the extended backup memory is indicated by '0'.
    data out Pointer to the data storage area.
    The array is as follows.

    char data[65535] ;
    length in Specify the size of data to be read.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of data(length) is wrong.
    EW_RANGE Address range error
    Start address(offset) is wrong.
    EW_NOOPT No option
    This function needs the PMC C language nonvolatile memory expansion or PMC C language nonvolatile memory expansion(256K) option.

    pmc\pmc_rdmsg

    Reads the data of 32 bytes transmitted from the PMC.
    It is necessary to transmit the data on the PMC side to read the data.
    If the data is not transmitted from the PMC, it waits in the library.
    The data is stored in the data array.
    The meaning of the data can be decided by the each application of the PMC and the MMC.

    The outline of each processing is as follows.

    Note) When the MMC side processing is late, the completion status on the PMC side is <-10>.
    See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdmsg(unsigned short FlibHndl,short *length, short *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in/out

    Specify the pointer to the reception data length.
    The data length actually received is returned.

    data in

    Specify the pointer to the reception data storage area.
    The array is as follows.

    short data[16] ;

    Note) The order of the data changes places on the MMC side and the PMC side as the following figure in case of PMC-NA.


    ERRORS

    Code Description
    EW_NOPMC There is no PMC.

    pmc\pmc_rdpmcinfo

    Reads the data information about the attribute of each kind of PMC, the effective range of PMC address, etc.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdpmcinfo(unsigned short FlibHndl, short adr_type, ODBPMCINF *pmcif);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    adr_type in

    Specify the kind of PMC address.

    0,... : refer to the table of pmc_rdpmcrng function
    -1 : all address information

    pmcif out

    Pointer to the ODBPMCINF structure including the PMC data information.
    The ODBPMCINF structure is as follows.

    typedef struct odbpmcinf {
        short        datano ;   /* number of PMC data information */
        struct       {
            char           pmc_adr ;  /* kind of PMC address */
            char           adr_attr ; /* attribute of PMC address */
            unsigned short top_num ;  /* top number of PMC address */
            unsigned short last_num ;/* last number of PMC address */
        } info[64] ;
    } ODBPMCINF ;
    
    datano
    Number of PMC data information (1 - 64)
    * Some PMC address may be separated into several parts.
    pmc_adr
    Type of PMC address (ASCII CODE)
    adr_attr
    Attribute of PMC address
    bit 7 : Write protection
    0 : enable
    1 : disable
    bit 0,..,6 : (Not used)
    top_num
    Top number of PMC address
    last_num
    Last number of PMC address
    * Refer to the table of pmc_rdpmcrng function.

    ERRORS

    Code Description
    EW_ATTRIB data attribute error
    Kind of data(adr_type) is wrong.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    pmc\pmc_rdpmcparam

    The PMC parameter(timer, counter, keep relay, and data) is uploaded by the tape format.

    When you execute this function, change to 'EDIT' mode.
    The format of the read PMC parameter is shown as follows.

    In case of SB5/SB6:

    %;
    N60xxx Pnnnnn; Timer(T)
    :
    N61xxx Pnnnnn; Counter(C)
    :
    N62xxx Pnnnnn; Keep relay(K)
    :
    N63xxx Pnnnnn; Data table control(D) of data
    :
    N64xxx Pnnnnn; Data(D) of data
    :
    %;

    In case of SB7:
    %;
    (PMC=SB7,MSID=0); Header
    N60xxx Pnnnnn; Timer(T)
    :
    N61xxx Pnnnnn; Counter(C)
    :
    N62xxx Pnnnnn; Keep relay(K)
    :
    N63xxx Pnnnnn; Data table control(D) of data
    :
    N64xxx Pnnnnn; Data(D) of data
    :
    N69xxx Pnnnnn; Extended memory(E)
    :
    %;

    In case of PMC for 30i/31i/32i:
    %;
    (PMC=30I-A,MSID=1); Header
    N60xxxx Pnnnnn; Timer(T)
    N61xxxx Pnnnnn; Counter(C)
    N62xxxx Pnnnnn; Keep relay(K)
    N63xxxx Pnnnnn; Data table control(D) of data
    N64xxxx Pnnnnn; Data(D) of data
    N69xxxx Pnnnnn; Extended memory(E)
    %;

    In case of 31i/32i, the header information is as follows.

    31i : (PMC=31I-A,MSID=1);
    32i : (PMC=32I-A,MSID=1);

    The header information is as follows by the unit type of PMC.

    1st PMC : (PMC=30I-A,MSID=1);
    2nd PMC : (PMC=30I-A,MSID=2);
    3rd PMC : (PMC=30I-A,MSID=3);
    Dual-check safety PMC : (PMC=30I-A,MSID=9);

    * ";" shows EOB(=0x0a).

    When the EOB data cannot be read by specified *length, data to immediately before is read.
    Moreover, when also one block of the PMC parameter cannot be read, EW_LENGTH error occurs.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdpmcparam(unsigned short FlibHndl, long *length, char *buff);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in/out Specify the pointer to the variable which stored the reading length.
    When the function is normal return (EW_OK), the function returns the length of the character which was actually read.
    buff out Specify the pointer to the area where the PMC parameter is stored.
    When the size of the area specified with this pointer is smaller than the size specified by *length, the operation of this function is not guaranteed.

    ERRORS

    Code Description
    EW_RESET Stop request
    All PMC parameter already was uploaded.
    EW_FUNC pmc_rdprmstart function has not been executed.
    EW_LENGTH Data length error
    The value of 0 or less was specified for read size(*length).
    EW_PATH PMC unit type was wrong.(only 30i/31i/32i)
    The PMC unit type was changed.
    EW_NOOPT no option
    EW_MODE CNC mode error
    CNC mode is not EDIT mode.

    pmc\pmc_rdpmcrng

    Reads the PMC data of the specified PMC address/range.

    This function is used to exchange the data between the application on MMC function and LADDER software on PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdpmcrng(unsigned short FlibHndl, short adr_type, short data_type, unsigned short s_number, unsigned short e_number, unsigned short length, IODBPMC *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    adr_type in

    Specify the identification code corresponding to the kind of the PMC address.

    • The referenceable range of PMC data of Series 15
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0511 NA/NB/NB2
      1 F (Signal to CNC->PMC) 0000-0319 NA
      0000-0511 NB/NB2
      2 Y (Signal to PMC->machine) 0000-0127 NA/NB/NB2
      3 X (Signal to machine->PMC) 0000-0127 NA/NB/NB2
      4 A (Message demand) 0000-0024 NA/NB
      0000-0124 NB2
      5 R (Internal relay) 0000-0999,
      2000-2999
      NA
      0000-1499,
      9000-9117
      NB
      0000-2999,
      9000-9199
      NB2
      6 T Changeable time 0000-0079 NA/NB
      0000-0299 NB2
      7 K (Keep relay) 0000-0018 NA
      0000-0019 NB
      0000-0039, 0900-0909 NB2
      8 C (Counter) 0000-0079 NA/NB
      0000-0199 NB2
      9 D (Data table) 0000-2999 NA/NB
      0000-7999 NB2

      It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"..."K0909" must not be written.

    • The referenceable range of PMC data of Series 15i
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0511,
      1000-1511
      NB6
      1 F (Signal to CNC->PMC) 0000-0511,
      1000-1511
      NB6
      2 Y (Signal to PMC->machine) 0000-0127,
      0200-0327
      NB6
      3 X (Signal to machine->PMC) 0000-0127,
      0200-0327
      NB6
      4 A (Message demand) 0000-0124 NB6
      5 R (Internal relay) 0000-2999,
      9000-9199
      NB6
      6 T (Changeable timer) 0000-0299 NB6
      7 K (Keep relay) 0000-0039,
      0900-0909
      NB6
      8 C (Counter) 0000-0199 NB6
      9 D (Data table) 0000-7999 NB6

      It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0900"..."K0909" must not be written.

    • The referenceable range of PMC data of Series 16/18 Model B/C
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0255,
      1000-1255
      SA1/SB3/SB5/SC3
      0000-0511,
      1000-1511,
      2000-2511
      SB4/SB6/SC4
      1 F (Signal to CNC->PMC) 0000-0255,
      1000-1255
      SA1/SB3/SB5/SC3
      0000-0511,
      1000-1511,
      2000-2511
      SSB4/SB6/SC4
      2 Y (Signal to PMC->machine) 0000-0127,
      1000-1014,
      1020-1034
      SA1/SB3/SB4/SB5/SB6/SC3/SC4
      3 X (Signal to machine->PMC) 0000-0127,
      1000-1019,
      1020-1039
      SA1/SB3/SB4/SB5/SB6/SC3/SC4
      4 A (Message demand) 0000-0024 SA1/SB3/SB5/SC3
      0000-0124 SB4/SB6/SC4
      5 R (Internal relay) 0000-0999,
      9000-9099
      SA1
      0000-1499,
      9000-9117
      SB3/SB5/SC3
      0000-2999,
      9000-9199
      SB4/SB6/SC4
      6 T (Changeable timer) 0000-0079 SA1/SB3/SB5/SC3
      0000-0299 SB4/SB6/SC4
      7 K (Keep relay) 0000-0019 SA1/SB3/SB5/SC3
      0000-0039,
      0900-0909
      SB4/SB6/SC4
      8 C (Counter) 0000-0079 SA1/SB3/SB5/SC3
      0000-0199 SB4/SB6/SC4
      9 D (Data table) 0000-1859 SA1
      0000-2999 SB3/SB5/SC3
      0000-7999 SB4/SB6/SC4

      It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"... must not be written.

    • The referenceable range of PMC data of Series 21 Model B, Series 0i-A
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0255,
      1000-1255
      SA1/SA3
      1 F (Signal to CNC->PMC) 0000-0255,
      1000-1255
      SA1/SA3
      2 Y (Signal to PMC->machine) 0000-0127,
      1000-1008
      SA1/SA3
      3 X (Signal to machine->PMC) 0000-0127,
      1000-1011
      SA1/SA3
      4 A (Message demand) 0000-0024 SA1/SA3
      5 R (Internal relay) 0000-0999,
      9000-9099
      SA1
      0000-0999,
      9000-9117
      SA3
      6 T (Changeable timer) 0000-0079 SA1/SA3
      7 K (Keep relay) 0000-0019 SA1/SA3
      8 C (Counter) 0000-0079 SA1/SA3
      9 D (Data table) 0000-1859 SA3

      It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.

    • The referenceable range of PMC data of Series 16i/18i,0i-B(SB7)
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0255,
      1000-1255
      SB5
      0000-0511,
      1000-1511,
      2000-2511
      SB6
      0000-0767,
      1000-1767,
      2000-2767
      SB7
      1 F (Signal to CNC->PMC) 0000-0255,
      1000-1255
      SB5
      0000-0511,
      1000-1511,
      2000-2511
      SB6
      0000-0767,
      1000-1767,
      2000-2767
      SB7
      2 Y (Signal to PMC->machine) 0000-0127 SB5/SB6/SB7
      0200-0327 SB6/SB7
      3 X (Signal to machine->PMC) 0000-0127 SB5/SB6/SB7
      0200-0327 SB6/SB7
      4 A (Message demand) 0000-0024 SB5
      0000-0124 SB6
      0000-0249,
      9000-9249
      SB7
      5 R (Internal relay) 0000-1499,
      9000-9117
      SB5
      0000-2999,
      9000-9199
      SB6
      0000-7999,
      9000-9499
      SB7
      6 T (Changeable timer) 0000-0079 SB5
      0000-0299 SB6
      0000-0499,
      9000-9499
      SB7
      7 K (Keep relay) 0000-0019 SB5
      0000-0039,
      0900-0909
      SB6
      0000-0099,
      0900-0919
      SB7
      8 C (Counter) 0000-0079 SB5
      0000-0199 SB6
      0000-0399,
      5000-5199
      SB7
      9 D (Data table) 0000-2999 SB5
      0000-7999 SB6
      0000-9999 SB7
      12 E (Extended relay) 0000-7999 SB7

      * It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" and "K0900"... must not be written.

    • The referenceable range of PMC data of Series 21i, 0i-B(SA1)
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0255,
      1000-1255
      SA1/SA5
      1 F (Signal to CNC->PMC) 0000-0255,
      1000-1255
      SA1/SA5
      2 Y (Signal to PMC->machine) 0000-0127 SA1/SA5
      3 X (Signal to machine->PMC) 0000-0127 SA1/SA5
      4 A (Message demand) 0000-0024 SA1/SA5
      5 R (Internal relay) 0000-0999,
      9000-9099
      SA1
      0000-0999,
      9000-9117
      SA5
      6 T (Changeable timer) 0000-0079 SA1/SA5
      7 K (Keep relay) 0000-0019 SA1/SA5
      8 C (Counter) 0000-0079 SA1/SA5
      9 D (Data table) 0000-1859 SA1/SA5

      It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.

    • The referenceable range of Series 0i-D
    • ID code Kind of PMC address 0i-D PMC 0i-D/0i Mate-D
      PMC/L
      0i-D
      DCS PMC
      0 G (Output signal from PMC to CNC) 0-767
      1000-1767
      2000-2767(Note1)
      3000-3767(Note1)
      4000-4767(Note1)
      5000-5767(Note1)
      6000-6767(Note1)
      7000-7767(Note1)
      8000-8767(Note1)
      9000-9767(Note1)
      0-767
      1000-1767(Note1)
      0-767
      1 F (Input signal to PMC from CNC) 0-767
      1000-1767
      2000-2767(Note1)
      3000-3767(Note1)
      4000-4767(Note1)
      5000-5767(Note1)
      6000-6767(Note1)
      7000-7767(Note1)
      8000-8767(Note1)
      9000-9767(Note1)
      0-767
      1000-1767(Note1)
      0-767
      2 Y (Output signal from PMC to machine) 0-127
      200-327
      400-527(Note2)
      600-727(Note2)
      1000-1127(Note2)
      0-127 0-127
      3 X (Input signal to PMC from machine) 0-127
      200-327
      400-527(Note2)
      600-727(Note2)
      1000-1127(Note2)
      0-127 0-127
      4 A (Message display)
         *Display request
      0-249 0-249 -
      A (Message display)
         *Display status
      9000-9249 9000-9249 -
      5 R (Internal relay) 0-7999 0-1499 0-1499
      R (System relay) 9000-9499 9000-9499 9000-9499
      6 T (Timer)
         *Variable timer
      0-449 0-79 0-79
      T (Timer)
         *Variable timer precision(Note3)
      9000-9499 9000-9079 9000-9079
      7 K (Keep relay)
         *User area
      0-99 0-19 0-19
      K (Keep relay)
         *Syatem area
      900-999 900-999 900-999
      8 C (Counter)
         *Variable counter
      0-399 0-79 0-79
      C (Counter)
         *Fixed counter
      5000-5199 5000-5039 5000-5039
      9 D (Data table) 0-9999 0-2999 0-2999
      12 E (Extra relay) 0-9999 0-9999 -

      Note
      1 This area is reserved for PMC management software. Do not use it in user programs.
      2 This area is reserved for PMC management software. No I/O can be allocated in this area. Do not use it in user programs.
      3 This area is used to specify the precision of a variable timer.
      4 It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.

    • The referenceable range of Series 30i/31i/32i-A
    • ID code Kind of PMC address 30i/31i/32i-A PMC 32i-A PMC/L
      1st, 2nd and 3rd PMC DSC PMC
      PMC Memory-A PMC Memory-B PMC Memory-C
      0 G (Output signal from PMC to CNC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767 0-767
      1000-1767
      1 F (Input signal to PMC from CNC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767 0-767
      1000-1767
      2 Y (Output signal to PMC from machine) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127 0-127
      3 X (Input signal from PMC to machine) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127 0-127
      4 A (Message display)
         *Display request
      0-249 0-249 0-499 0-249 0-249
      A (Message display)
         *Display status
      9000-9249 9000-9249 9000-9499 9000-9249 9000-9249
      5 R (Internal relay) 0-1499 0-7999 0-15999 0-1499 0-1499
      R (System relay) 9000-9499 9000-9499 - 9000-9499 9000-9499
      6 T (Timer)
         *Variable timer
      0-79 0-499 0-999 0-79 0-79
      T (Timer)
         *Variable timer precision(Note2)
      9000-9079 9000-9499 9000-9999 9000-9079 9000-9079
      7 K (Keep relay)
         *User range
      0-19 0-99 0-199 0-19 0-19
      K (Keep relay)
         *System range
      900-999 900-999 900-999 900-999 900-999
      8 C (Counter)
         *Variable counter
      0-79 0-399 0-799 0-79 0-79
      C (Counter)
         *Fixed counter
      5000-5039 5000-5199 5000-5399 5000-5039 5000-5039
      9 D (Data table) 0-2999 0-9999 0-19999 0-2999 0-2999
      10 M (Input signal from other PMC path) 0-767 0-767 0-767 - -
      11 N (Output signal to other PMC path) 0-767 0-767 0-767 - -
      12 E (Extra relay) 0-9999(Note3) 0-9999(Note3) 0-9999(Note3) (Note4) 0-9999
      13 Z (System relay) - - 0-499 - -

      Note
      1 This area is reserved for PMC management software. Do not use it in user programs.
      2 This area is used to specify the precision of a variable timer.
      3 This area is common memory for the multi-PMC function. It is possible for each program to read the same value from, and write to, the area.
      4 No extra relay is available for the dual-check safety PMC.
      5 It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.

    • The referenceable range of Series 0i-F, 30i/31i/32i/35i-B, PMi-A
    • ID code Kind of PMC address 1st to 5th path PMC DSC PMC
      PMC Memory-A PMC Memory-B PMC Memory-C PMC Memory-D
      0 G (Output signal from PMC to CNC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1 F (Input signal to PMC from CNC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      2 Y (Output signal from PMC to machine) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      3 X (Input signal to PMC from machine) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      4 A (Message display)
         *Display request
      0-249 0-249 0-499 0-749 0-249
      A (Message displsy)
         Display status
      9000-9249 9000-9249 9000-9499 9000-9749 9000-9249
      5 R (Internal relay) 0-1499 0-7999 0-15999 0-59999 0-1499
      R (System relay) 9000-9499 9000-9499 - - 9000-9499
      6 T (Timer)
         *Variable timer
      0-79 0-499 0-999 0-999 0-79
      T (Timer)
         *Variable timer precision(Note2)
      9000-9079 9000-9499 9000-9999 9000-9999 9000-9079
      7 K (Keep relay)
         *User range
      0-19 0-99 0-199 0-299 0-19
      K (Keep relay)
         *System range
      900-999 900-999 900-999 900-999 900-999
      8 C (Counter)
         *Changeable counter
      0-79 0-399 0-799 0-1199 0-79
      C (Counter)
         *Fixed counter
      5000-5039 5000-5199 5000-5399 5000-5599 5000-5039
      9 D (Data table) 0-2999 0-9999 0-19999(Note5) 0-59999(Note5) 0-2999
      10 M (Input signal from other PMC path) 0-767 0-767 0-767 0-767 -
      11 N (Output signal to other PMC path) 0-767 0-767 0-767 0-767 -
      12 E (Extra relay) 0-9999(Note3) 0-9999(Note3) 0-9999(Note3) 0-9999(Note3) (Note4)
      13 Z (System relay) - - 0-499 0-499 -

      Note
      1 This area is reserved for PMC management software. Do not use it in user programs.
      2 This area is used to specify the precision of a variable timer.
      3 This area is common memory for the multi-PMC function. It is possible for each program to read the same value from, and write to, the area.
      4 No extra relay is available for the dual-check safety PMC.
      5 To save all area of the data table, the "Nonvolatile PMC data table area expansion (40KB)" option may be necessary.
      6 It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017"..."K0019" must not be written.

    • The referenceable range of PMC data of Power Mate i
    • ID code Kind of PMC address Referenceable range (Kind of PMC)
      0 G (Signal to PMC->CNC) 0000-0255,
      1000-1255
      SB5
      0000-0511,
      1000-1511,
      2000-2511
      SB6
      1 F (Signal to CNC->PMC) 0000-0255,
      1000-1255
      SB5
      0000-0511,
      1000-1511,
      2000-2511
      SB6
      2 Y (Signal to PMC->machine) 0000-0127,
      1000-1002,
      1020-1051
      SB5/SB6
      3 X (Signal to machine->PMC) 0000-0127,
      1000-1003,
      1020-1051
      SB5/SB6
      4 A (Message demand) 0000-0024 SB5
      0000-0124 SB6
      5 R (Internal relay) 0000-1499,
      9000-9117
      SB5
      0000-2999,
      9000-9199
      SB6
      6 T (Changeable timer) 0000-0079 SB5
      0000-0299 SB6
      7 K (Keep relay) 0000-0019 SB5
      0000-0039,
      0900-0909
      SB6
      8 C (Counter) 0000-0079 SB5
      0000-0199 SB6
      9 D (Data table) 0000-2999 SB5
      0000-7999 SB6

      * It is not possible to write to all areas of address 'F' and 'X', and "R9000",... Moreover, "K0017",..,"K0019" and "K0900"..."K0909" must not be written.
      * See the "PROGRAMMING MANUAL" of PMC about the CNC at which the PMC can be supported.

    data_type in Specify the type of the PMC data.
    It must be the same one as the type of data of the PMC side.
    0 : Byte type
    1 : Word type
    2 : Long type
    4 : 32-bit floating-point type(30i-B Series/0i-F/PMi-A only)
    5 : 64-bit floating-point type(30i-B Series/0i-F/PMi-A only)
    s_number in Specify the start PMC address number.
    e_number in Specify the end PMC address number.
    length in Specify the data block length.
    data_type is 0(byte type) : length = 8 + N
    data_type is 1(word type) : length = 8 + N × 2
    data_type is 2(long type) : length = 8 + N × 4
    data_type is 4(32-bit floating-point type) : length = 8 + N × 4
    data_type is 5(64-bit floating-point type) : length = 8 + N × 8
    * N is the number of read data.
    buf out

    Pointer to the IODBPMC structure.
    The IODBPMC structure is as follows. In case of using PMC memory D in Series 0i-F, 30i/31i/32i/35i-B, PMi-A, define character constant "PMCMEMD" at compiling by the '-D' option.

    #if defined (PMCMEMD)
    typedef struct iodbpmc {
        short            type_a ;   /* Kind of PMC address */
        short            type_d ;   /* Type of the PMC data */
        unsigned short   datano_s ; /* Start PMC address number */
        unsigned short   datano_e ; /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
            float   fdata[N] ; /*            (32-bit floating-point type)*/
            double  dfdata[N]; /*            (64-bit floating-point type)*/
        } u ;           /* N is the number of read data */
    } IODBPMC ;
    #else
    typedef struct  iodbpmc {
        short   type_a ;    /* Kind of PMC address */
        short   type_d ;    /* Type of the PMC data */
        short   datano_s ;  /* Start PMC address number */
        short   datano_e ;  /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
            float   fdata[N] ; /*            (32-bit floating-point type)*/
            double  dfdata[N]; /*            (64-bit floating-point type)*/
        } u ;           /* N is the number of read data */
    } IODBPMC ;
    #endif
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    adr_type in

    Specify the identification code corresponding to the kind of the PMC address.

    • The referenceable range of Series 30i/31i/32i-A
    • ID code Kind of PMC address 30i/31i/32i-A PMC 32i-A PMC/L
      1st, 2nd and 3rd PMC DSC PMC
      PMC Memory-A PMC Memory-B PMC Memory-C
      0 G (Signal to PMC->CNC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767 0-767
      1000-1767
      1 F (Signal to CNC->PMC) 0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767
      1000-1767
      2000-2767
      3000-3767
      4000-4767
      5000-5767
      6000-6767
      7000-7767
      8000-8767
      9000-9767
      0-767 0-767
      1000-1767
      2 Y (Signal to PMC->machine) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127 0-127
      3 X (Signal to machine->PMC) 0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127
      200-327
      400-527
      600-727
      1000-1127(Note1)
      0-127 0-127
      4 A (Message)
         *Message display
      0-249 0-249 0-499 0-249 0-249
      A (Message)
         *status display
      9000-9249 9000-9249 9000-9499 9000-9249 9000-9249
      5 R (Internal relay) 0-1499 0-7999 0-15999 0-1499 0-1499
      R (System relay) 9000-9499 9000-9499 - 9000-9499 9000-9499
      6 T (Timer)
         *Changeable timer
      0-79 0-499 0-999 0-79 0-79
      T (Timer)
         *Variable-timer precision(Note2)
      9000-9079 9000-9499 9000-9999 9000-9079 9000-9079
      7 K (Keep relay)
         *User range
      0-19 0-99 0-199 0-19 0-19
      K (Keep relay)
         *System range
      900-999 900-999 900-999 900-999 900-999
      8 C (Counter)
         *Changeable counter
      0-79 0-399 0-799 0-79 0-79
      C (Counter)
         *Fixed counter
      5000-5039 5000-5199 5000-5399 5000-5039 5000-5039
      9 D (Data table) 0-2999 0-9999 0-19999 0-2999 0-2999
      10 M (Signal input from other PMC path) 0-767 0-767 0-767 - -
      11 N (Signal output to other PMC path) 0-767 0-767 0-767 - -
      12 E (Extended relay) 0-9999(Note3) 0-9999(Note3) 0-9999(Note3) (Note4) 0-9999
      13 Z (System relay) - - 0-499 - -

      Note
      1 This area is reserved for PMC management software. No I/O can be allocated in this area. Do not use it in user programs.
      2 This area is used to specify the precision of a variable timer. Do not use it in user programs.
      3 This area is common memory for the multi-PMC function. It is possible for each program to read the same value from, and write to, the area.
      4 No extra relay is available for the dual-check safety PMC.

    data_type in Specify the type of the PMC data.
    It must be the same one as the type of data of the PMC side.
    0 : Byte type
    1 : Word type
    2 : Long type
    s_number in Specify the start PMC address number.
    e_number in Specify the end PMC address number.
    length in Specify the data block length.
    data_type is 0(byte type) : length = 8 + N
    data_type is 1(word type) : length = 8 + N × 2
    data_type is 2(long type) : length = 8 + N × 4
    * N is the number of read data.
    buf out

    Pointer to the IODBPMC structure.
    The IODBPMC structure is as follows.
    In case of using PMC memory D in Series 30i/31i/32i/35i-B, PMi-A, define character constant "PMCMEMD" at compiling by the '-D' option.

    #if defined (PMCMEMD)
    typedef struct iodbpmc {
        short            type_a ;   /* Kind of PMC address */
        short            type_d ;   /* Type of the PMC data */
        unsigned short   datano_s ; /* Start PMC address number */
        unsigned short   datano_e ; /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
        } u ;           /* N is the number of read data */
    } IODBPMC ;
    #else
    typedef struct  iodbpmc {
        short   type_a ;    /* Kind of PMC address */
        short   type_d ;    /* Type of the PMC data */
        short   datano_s ;  /* Start PMC address number */
        short   datano_e ;  /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
        } u ;           /* N is the number of read data */
    } IODBPMC ;
    #endif
    

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of IODBPMC structure(length) is wrong.
    EW_RANGE Address range error
    PMC address number(s_number,e_number) is wrong.
    EW_ATTRIB Data attribute error
    Kind of PMC address(adr_type) or type of PMC data (data_type) is wrong.
    EW_PASSWD The data of specified range cannot be read because the data is protected.
    (Series 16i/18i/21i, 0i-A/B/C)

    pmc\pmc_rdpmctitle

    Reads the PMC title data from PMC.
    When this function is executed while editing the title data with PMC, the return value becomes EW_REJECT, so please retry.
    This function is effective in PMC-SB7, 30i, 0i-D/F and PMi-A.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdpmctitle(unsigned short FlibHndl, ODBPMCTITLE *title);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    title out

    Pointer to the array of ODBPMCTITLE structure where returned data are stored.
    The ODBPMCTITLE structure is as follows.

    typedef struct  odbpmctitle {
        char    mtb[48];       /* MACHINE TOOL BUILDER NAME */
        char    machine[48];   /* MACHINE TOOL NAME */
        char    type[48];      /* NC & PMC TYPE NAME */
        char    prgno[8];      /* PMC PROGRAM NO. */
        char    prgvers[4];    /* EDITION NO. */
        char    prgdraw[48];   /* ROGRAM DRAWING NO. */
        char    date[32];      /* DATE OF PROGRAMIN */
        char    design[48];    /* PROGRAM DESIGNED BY */
        char    written[48];   /* ROM WRITTEN BY */
        char    remarks[48];   /* REMARKS */
    } ODBPMCTITLE ;
    
    mtb
    MACHINE TOOL BUILDER NAME
    machine
    MACHINE TOOL NAME
    type
    NC & PMC TYPE NAME
    prgno
    PMC PROGRAM NO.
    prgvers
    EDITION NO.
    prgdraw
    PROGRAM DRAWING NO.
    date
    DATE OF PROGRAMING
    design
    PROGRAM DESIGNED BY
    written
    ROM WRITTEN BY
    remarks
    REMARKS
    The each character string is terminated by 'NULL'.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_DATA Ladder program is broken.
    EW_REJECT Title data is editing by PMC.
    Please retry.
    EW_VERSION Version mismatch between PMC and library Replace the library or PMC control software.

    pmc\pmc_rdprmend

    End of upload of the PMC parameter(timer, counter, keep relay, and data) by the tape format.

    This function is executable other than EDIT mode.
    However, when EW_MODE or EW_PATH occurred by pmc_rdpmcparam, the return value of this function becomes the same value, too.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdprmend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC pmc_rdprmstart function has not been executed.
    EW_NOOPT no option
    EW_MODE CNC mode error
    pmc_rdpmcparam was executed other than the EDIT mode.
    EW_PATH PMC unit type was wrong.(only 0i-F,30i/31i/32i)
    The PMC unit type was changed.

    pmc\pmc_rdprmstart

    Starts uploading the PMC parameter(timer, counter, keep relay, and data) of the tape format.

    To uploading of PMC parameter, this function, pmc_rdpmcparam and pmc_rdprmend is used.
    The procedure of uploading the PMC parameter is shown as follows.

    * Upload the PMC parameter repeatedly until the return value of pmc_rdpmcparam becomes excepting EW_OK. When all data is uploaded, EW_RESET is returned as a return value.
    * Judge final result of the uploading of PMC parameter from the return value of pmc_rdprmend
    * In case of 0i-F, 30i/31i/32i, please beforehand select the PMC unit type which becomes the object by pmc_select_pmc_unit.

    When you execute this function, change the CNC mode to EDIT.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_rdprmstart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    pmc_rdprmstart or pmc_wrprmstart function has been already executed.
    EW_NOOPT no option

    pmc\pmc_select_pmc_unit

    Selects PMC that will be the target of other PMC FOCAS2 function by the unit type.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_select_pmc_unit ( unsigned short FlibHndl, long unittype );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    unittype in Specify the PMC unit type to be selected.

    Value Unit type
    PMCUNIT_PMC1 (1) 1st PMC
    PMCUNIT_PMC2 (2) 2nd PMC
    PMCUNIT_PMC3 (3) 3rd PMC
    PMCUNIT_PMC4 (4) 4th PMC
    PMCUNIT_PMC5 (5) 5th PMC
    PMCUNIT_DCS (9) Dual-check safety PMC

    ERRORS

    Code Description
    EW_NOPMC Specified PMC not exist

    pmc\pmc_set_timer_type

    Writes the PMC timer type of the specified timer number.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_set_timer_type(unsigned short FlibHndl, unsigned short s_no, unsigned short e_no, short *type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_no in

    Specify the start PMC timer number(1-250).

    e_no in

    Specify the end PMC timer number(1-250).

    type in Specify the address of the array where the timer type is stored.
    The timer type is as follows.
    0 : Initial Value
    1 : 1msec
    2 : 10msec
    3 : 100msec
    4 : 1sec
    5 : 1min
    When initial value (0) is specified, accuracy is as follows by the timer number.
    No.1 〜 No.8 : 48msec
    No.9 〜 No.250 : 8msec

    ERRORS

    Code Description
    EW_RANGE Timer number error
    PMC timer number(s_no, e_no) is wrong.
    EW_DATA PMC timer type(type) is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerrfunction.
    The timer number in which includ an incorrect data will be set onto the err_dtno of ODBPMCERR.

    pmc\pmc_wrcntldata

    Writes the control data to manage PMC data table (address D).

    This function is not available at PMC-NA.

    Refer to the programming manual of PMC(ladder language) concerning the details of input arguments.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrcntldata(unsigned short FlibHndl, short length, IODBPMCCNTL *pmccntl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of data block.
    (size of IODBPMCCNTL structure)

    IODBPMCCNTL


    N is the number of group to be written.
    pmccntl in Pointer to the IODBPMCCNTL structure to set the control data of PMC data table.
    The IODBPMCCNTL structure is as follows.
    typedef struct iodbpmccntl {
        short   datano_s ;      /* start group number */
        short   dummy ;         /* (not used) */
        short   datano_e ;      /* end group number */
        struct {
            char    tbl_prm ; /* table parameter */
            char    data_type ;     /* data type */
            unsigned short  data_size ;
                            /* size of data in group */
            unsigned short  data_dsp ;
                            /* address of data in group */
            short   dummy ;         /* (not used) */
        } info[N] ;     /* N : number of group to be written */
    } IODBPMCCNTL ;
    
    datano_s
    Specify the start group number.
    datano_e
    Specify the end group number.
    tbl_prm
    Specify the table parameter.
    bit 0 : Format of data table
    0 : binary
    1 : BCD
    bit 1 : Protection of data table
    0 : no protection
    1 : protection
    bit 2 : Format of data table
    0 : binary or BCD
    1 : hexadecimal
    bit 3,..,7 : (not used)
    data_type
    Specify the data type.(0:BYTE,1:WORD,2:LONG,3:BIT,4:REAL,5:LREAL)
    data_size
    Specify the size of data in group(number of byte)
    data_dsp
    Specify the address of data in group(address D inside)

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBPMCCNTL structure(length) is wrong.
    EW_NUMBER data number error
    Group number(datano_s,datano_e) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute pmc_getdtailerrfunction.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Error except EW_DATA
    1 : Table parameter error
    2 : Data type error
    3 : Size of data in group error
    4 : Address of data in group error
    And the group number in which includ an incorrect data will be set onto the member, err_dtno of ODBPMCERR.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    pmc\pmc_wrcntlgrp

    Writes the total number of groups of the control data to manage PMC data table(address D).

    This function is not available at PMC-NA.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrcntlgrp(unsigned short FlibHndl, short grp_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in Specify the total number of groups.

    ERRORS

    Code Description
    EW_DATA data error
    Group number(grp_no) is wrong.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    pmc\pmc_wrkpm

    Writes the data to the extended backup memory of PMC specified by "offset", "length".
    The data must be stored in "data" as the same format with PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrkpm(unsigned short FlibHndl, unsigned long offset,char *data,unsigned short length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    offset in Specify the start address.
    The top of the extended backup memory is indicated by '0'.
    data in Pointer to the data storage area.
    The array is as follows.

    char data[65535] ;
    length in Specify the size of data to be written.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of data(length) is wrong.
    EW_RANGE Address range error
    Start address(offset) is wrong.
    EW_NOOPT No option
    This function needs the extended backup memory option.

    pmc\pmc_wrkpm2

    Writes the data to the extended backup memory of PMC specified by "offset", "length".
    The data must be stored in "data" as the same format with PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrkpm2(unsigned short FlibHndl, unsigned long offset,char *data,unsigned long length);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    offset in Specify the start address.
    The top of the extended backup memory is indicated by '0'.
    data in Pointer to the data storage area.
    The array is as follows.

    char data[65535] ;
    length in Specify the size of data to be written.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of data(length) is wrong.
    EW_RANGE Address range error
    Start address(offset) is wrong.
    EW_NOOPT No option
    This function needs the PMC C language nonvolatile memory expansion or PMC C language nonvolatile memory expansion(256K) option.

    pmc\pmc_wrmsg

    Writes the data of 32 bytes transmitted to the PMC.
    It is necessary to receive the data on the PMC side to write the data.
    If the PMC side does not receive the data, it waits in the library.
    The data must be stored in the data array.
    The meaning of the data can be decided by the each application of the PMC and the MMC.

    The outline of each processing is as follows.

    Note) When the MMC side processing is late, the completion status on the PMC side is <-10>.
    See the "PROGRAMMING MANUAL" of PMC for details of the PMC side processing.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrmsg(unsigned short FlibHndl,short length, short *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in

    Specify the data block length of the transmission data.

    data in

    Specify the pointer to the transmission data storage area.
    The array is as follows.

    short data[16] ;

    Note) The order of the data changes places on the MMC side and the PMC side as the following figure in case of PMC-NA.


    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Data length(length) is wrong.

    pmc\pmc_wrpmcparam

    The PMC parameter(timer, counter, keep relay, and data) is downloaded by the tape format.
    When you execute this function, set '1' for PWE of the CNC parameter and make the state of CNC an emergency stop.
    Refer to the description of pmc_rdpmcparam for the format of PMC parameter.
    When the last character of buffer is not "A" or "%", EW_DATA error occurs.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrpmcparam(unsigned short FlibHndl, long *length, char *buff);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    length in/out Specify the pointer to the variable where the character size which wants to write is set.
    The function returns the length of the character which was written actually.
    buff in Specify the pointer to the area where the PMC parameter which wants to be written is stored.

    ERRORS

    Code Description
    EW_RESET Stop request
    All PMC parameter already was written.
    EW_FUNC pmc_wrprmstart function has not been executed.
    EW_LENGTH Data length error
    The value of 0 or less was specified for write size(*length).
    EW_DATA Data error
    The writing format is wrong.
    In case of 0i-F,30i/31i/32i, in order to get more information for this err_no return value, execute pmc_getdtailerrfunction.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The first character string was not "%;".
    2 : The end of the character string was not ";(0x0A)" or "%".
    3 : The character string of second block was not the header information.
    4 : A model name of header information and an actual model are different.
    5 : The character by which header information and ID information were delimited was not ",".
    6 : The character string of ID information on header information was not "MSID =".
    7 : The MSID number on header information and current PMC unit type are different.
    8 : The last character of header information was not ")".
    9 : The first character of parameter block was not "N".
    10 : The address number of parameter block was wrong. (no six digits)
    11 : The address number of parameter block was wrong. (the head of N number is not "6")
    12 : The third character of the parameter block was not "0", "1", "2", "3", "4", or "9".
    13 : The block of larger group information than the total of the group was specified.
    14 : The data table control information was wrong. (number which cannot be specified)
    15 : The head of the character for the set value on the parameter block was not "P".
    16 : The character which was not the numerical value was included in the setting value. (format error of setting value)
    17 : The number of characters of bit patterns was not eight characters. (format error of setting value)
    18 : The range of address was wrong.
    19 : The total number of data table control information was wrong.
    20 : The data table control information was wrong.
    And the block number(0-) in which includ an incorrect data will be set onto the member, err_dtno of ODBPMCERR.
    EW_NOOPT no option
    EW_PARAM Parameter error
    CNC parameter(PWE) is '0'.
    EW_PATH PMC unit type was wrong.(only 0i-F,30i/31i/32i)
    The PMC unit type was changed.
    EW_REJECT CNC execution rejection
    CNC is not in "Emergency" state.

    pmc\pmc_wrpmcrng

    Writes the PMC data of the specified PMC address/range.

    This function is used to exchange the data between the application on MMC function and LADDER software on PMC.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrpmcrng(unsigned short FlibHndl, short length,IODBPMC *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in Specify the data block length.
    data_type is 0(byte type) : length = 8 + N
    data_type is 1(word type) : length = 8 + N × 2
    data_type is 2(long type) : length = 8 + N × 4
    data_type is 4(32-bit floating-point type) : length = 8 + N × 4
    data_type is 5(64-bit floating-point type) : length = 8 + N × 8
    * N is the number of written data.
    buf in

    Pointer to the IODBPMC structure.
    The IODBPMC structure is as follows.
    In case of using PMC memory D in Series 0i-F, 30i/31i/32i/35i-B, PMi-A, define character constant "PMCMEMD" at compiling by the '-D' option.

    #if defined (PMCMEMD)
    typedef struct iodbpmc {
        short            type_a ;   /* Kind of PMC address */
        short            type_d ;   /* Type of the PMC data */
        unsigned short   datano_s ; /* Start PMC address number */
        unsigned short   datano_e ; /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
            float   fdata[N] ; /*            (32-bit floating-point type)*/
            double  dfdata[N]; /*            (64-bit floating-point type)*/
        } u ;           /* N is the number of read data */
    } IODBPMC ;
    #else
    typedef struct  iodbpmc {
        short   type_a ;    /* Kind of PMC address */
        short   type_d ;    /* Type of the PMC data */
        short   datano_s ;  /* Start PMC address number */
        short   datano_e ;  /* End PMC address number */
        union {
            char    cdata[N] ;/* The PMC data(byte type) */
            short   idata[N] ;/*             (word type) */
            long    ldata[N] ;/*             (long type) */
            float   fdata[N] ; /*            (32-bit floating-point type)*/
            double  dfdata[N]; /*            (64-bit floating-point type)*/
        } u ;           /* N is the number of written data */
    } IODBPMC ;
    #endif
    
    type_a
    Specify the identification code corresponding to the kind of the PMC address.
    type_d
    Specify the type of the PMC data.
    It must be the same one as the type of data of the PMC side.
    0 : Byte type
    1 : Word type
    2 : Long type
    4 : 32-bit floating-point type(30i-B Series/0i-F/PMi-A only)
    5 : 64-bit floating-point type(30i-B Series/0i-F/PMi-A only)
    datano_s
    Specify the start PMC address number.
    datano_e
    Specify the end PMC address number.
    See "The referenceable range of PMC data" of "Read PMC data(area specified) (pmc_rdpmcrng)" about the kind of the PMC address, the start address, and the end address.

    ERRORS

    Code Description
    EW_NOPMC There is no PMC.
    EW_LENGTH Data block length error
    Size of IODBPMC structure(length) is wrong.
    EW_RANGE Address range error
    Address range error PMC address number(datano_s,datano_e) is wrong.
    EW_ATTRIB Data attribute error
    Kind of PMC address(type_a) or type of PMC data (type_d) is wrong.
    EW_PASSWD The data of specified range cannot be written because the data is protected.
    (Series 16i/18i/21i, 0i-A/B/C)

    pmc\pmc_wrprmend

    End of download of the PMC parameter(timer, counter, keep relay, and data) by the tape format.

    Even if the PWE of CNC parameter is '0' or the state of CNC is not an emergency stop, this function is executable.
    However, when EW_DATA, EW_PARAM, EW_PATH and EW_REJECT occurred during writing, the return value of this function becomes the same value.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrprmend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC pmc_wrprmstart function has not been executed.
    EW_DATA Data error
    The writing format is wrong.
    EW_NOOPT no option
    EW_PARAM Parameter error
    CNC parameter(PWE) is '0'.
    EW_PATH PMC unit type was wrong.(only 0i-F,30i/31i/32i)
    The PMC unit type was changed.
    EW_REJECT CNC execution rejection
    CNC is not in "Emergency" state.

    pmc\pmc_wrprmstart

    Starts downloading the PMC parameter(timer, counter, keep relay, and data) of the tape format.

    To downloading of PMC parameter, this function, pmc_wrpmcparam and pmc_wrprmend is used.

    The procedure of downloading the PMC parameter is shown as follows.

    * Repeatedly download the PMC parameter until the return value of pmc_wrpmcparam becomes excepting EW_OK or writing data is lost.
    * Judge final result of the downloading of PMC parameter from the return value of pmc_wrprmend.
    * In case of 0i-F, 30i/31i/32i, please beforehand select the PMC unit type which becomes the object by pmc_select_pmc_unit.

    When you execute this function, set '1' for PWE of the CNC parameter and make the state of CNC an emergency stop.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_wrprmstart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    pmc_rdprmstart or pmc_wrprmstart function has been already executed.
    EW_NOOPT no option
    EW_PARAM Parameter error
    CNC parameter(PWE) is '0'.
    EW_REJECT CNC execution rejection
    CNC is not in "Emergency" state.

    position\cnc_absolute

    Reads the absolute position data of axis specified with "axis". The absolute position is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an absolute position of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the absolute position can be acquired in the cnc_getfigure function.

    • Series 15/15i
    • The relation to the read absolute position, amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay follows setting the CNC parameter of the following description.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • Amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay is always included in the read absolute position.

    • Series 16i/18i-W
    • Amounts of Wire diameter Compensation, amounts of servo delay and acceleration/deceleration delay is always included in the read absolute position.

    • Series 30i/31i/32i, 0i-D/F, Power Motion i-A
    • Amount of Tool Length Compensation and Cutter Radius Compensation is always included in the read absolute position. But, amount of servo delay and acceleration/deceleration delay is not included.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_absolute( unsigned short FlibHndl, short axis, short length, ODBAXIS *absolute );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    absolute out

    Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Absolute position data of controlled axis. */
    } ODBAXIS ;                             /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    absolute out

    Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Absolute position data of controlled axis. */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_absolute2

    Differences between functions of cnc_absolute2 and functions of cnc_absolute are described.

    The interface of function is similar to cnc_absolute function.

    The cnc_absolute function reads an absolute actual position where the amount of all the tool offset was added to the command value. Therefore, the coodinates values called by cnc_absolute and absolute position displayed on the position display on CNC screen might be different by the setting of CNC parameter.

    The cnc_absolute2 function reads the same value as the absolute position diaplayed on the position display on CNC screen.

    (Note) Only when CNC control software supports the cnc_absolute2 function at the special series and version, cnc_absolute2 reads the same value as the absolute position diaplayed on the position display on CNC screen. If CNC control software does not support this function, cnc_absolute2 reads the same value returned by cnc_absolute.

    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • Both cnc_absolute and cnc_absolute2 read the same value as the absolute position displayed on the position display of CNC screen.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_absolute2( unsigned short FlibHndl, short axis, short length, ODBAXIS *absolute );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    absolute out

    Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* Absolute position data of controlled axis. */
    } ODBAXIS ;                         /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    absolute out

    Pointer to the ODBAXIS structure including the absolute position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* Absolute position data of controlled axis. */
    } ODBAXIS ;                     /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_accdecdly

    Reads the acceleration/deceleration delay amount of axis specified with "axis". The acceleration/deceleration delay amount is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an acceleration/deceleration delay amount of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the acceleration/deceleration delay amount can be acquired in the cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_accdecdly(unsigned short FlibHndl, short axis, short length, ODBAXIS *accdecdly);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    accdecdly out

    Pointer to the ODBAXIS structure including the acceleration/deceleration delay amount of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;           /* Not used. */
        short   type ;            /* Axis number. */
        long    data[MAX_AXIS] ;  /* Acceleration/deceleration delay amount of controlled axis. */
    } ODBAXIS ;          /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    accdecdly out

    Pointer to the ODBAXIS structure including the acceleration/deceleration delay amount of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;           /* Not used. */
        short   type ;            /* Axis number. */
        long    data[MAX_AXIS] ;  /* Acceleration/deceleration delay amount of controlled axis. */
    } ODBAXIS ;          /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_actf

    Reads the actual feed rate of the controlled axes of CNC. The actual feed rate is stored in "data" of "ODBACT".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_actf(unsigned short FlibHndl, ODBACT *actualfeed);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    actualfeed out

    Pointer to the ODBACT structure including the actual feed rate of the controlled axes. The ODBACT structure is as follows.

    typedef struct odbact {
        short  dummy[2];                /* dummy */
        long  data;                     /* the actual feed rate(F) */
    } ODBACT ;
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    actualfeed out

    Pointer to the ODBACT structure including the actual feed rate of the controlled axes. The ODBACT structure is as follows.

    typedef struct odbact {
        short  dummy[2];                /* dummy */
        long  data;                     /* the actual feed rate(F) */
    } ODBACT ;
    

    ERRORS

    Code Description
    EW_PARAM(Only Series 15) CNC parameter error
    7613#0=0 when CNC is turned on,
    or 7613#0=1, 7613#1=0, 7613#2=0 at present.
    Set 7613#0=1 and 7613#1=1.
    Note)
    No error occurs in case of 7613#0=1, 7613#1=0, 7613#2=1, but the data is invalid.

    position\cnc_acts

    Reads the actual rotational speed of the spindle connected to CNC.
    The actual spindle speed is stored in "data" of "ODBACT".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_acts(unsigned short FlibHndl, ODBACT *actualfeed);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    actualfeed out

    Pointer to the ODBACT structure including the actual spindle speed. The ODBACT structure is as follows.

    typedef struct odbact {
        short  dummy[2];                /* Not used. */
        long  data;                     /* Actual spindle speed(S). */
    } ODBACT ;
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    actualfeed out

    Pointer to the ODBACT structure including the actual spindle speed. The ODBACT structure is as follows.

    typedef struct odbact {
        short  dummy[2];                /* Not used. */
        long  data;                     /* Actual spindle speed(S). */
    } ODBACT ;
    

    ERRORS

    Code Description
    EW_PARAM CNC parameter error
    (Series 15)

    position\cnc_acts2

    Reads the actual rotational speed of the spindle connected to CNC.
    The actual spindle speed is stored in "data[0]" of "ODBACT2".

    All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no". In that case, an actual spindle speed of each serial spindle is stored in the data array of ODBACT2.

    cnc_acts can read only the actual spindle speed which is selected by CNC. This function can read all actual spindle speed at a time, or the actual spindle speed specified by "sp_no".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_acts2(unsigned short FlibHndl, short sp_no, ODBACT2 *actualspindle);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,n : for each spindle

    n is MAX_SPINDLES(maximum number of spindle).

    • Series 15i, 16i/18i/21i, 0i-A/B/C
    • MAX_SPINDLES : 4

    • Series 30i, 0i-D/F
    • MAX_SPINDLES : 8

    • Power Mate i-D
    • MAX_SPINDLES : 1

    actualspindle out

    Pointer to the ODBACT2 structure including the actual spindle speed of the serial spindle. The ODBACT2 structure is as follows.

    typedef struct odbact2 {
            short   datano;                 /* Spindle number. */
            short   type;                   /* Not used. */
            long    data[MAX_SPINDLES];     /* Spindle data. */
    } ODBACT2 ;               /* MAX_SPINDLES is maximum number of spindle. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,n : for each spindle

    MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i.

    actualspindle out

    Pointer to the ODBACT2 structure including the actual spindle speed of the serial spindle. The ODBACT2 structure is as follows.

    typedef struct odbact2 {
            short   datano;                 /* Spindle number. */
            short   type;                   /* Not used. */
            long    data[MAX_SPINDLES];     /* Spindle data. */
    } ODBACT2 ;               /* MAX_SPINDLES is maximum number of spindle. */
    

    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of spindle number (sp_no) is illegal.

    position\cnc_canmovrlap

    Cancel the manual overlapped motion value of axis specified with "axis".

    It is possible to cancel the manual overlapped motion value of all axes at a time by specifying ALL_AXES for "axis".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_canmovrlap(unsigned short FlibHndl, short axis);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to cancel.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m :number of controlled axis)

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The specification of axis number (axis) is improper.
    EW_NOOPT No option
    Size of ODBAXIS structure (length) is illegal.
    EW_PARAM CNC parameter error
    Set 7100#3=1.( Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A )

    position\cnc_clr3dplsmov

    Clears the handle interrupt pulse amount and the handle interrupt move amount.

    It is only the handle interrupt pulse amount to be able to specify the mode. (The handle interrupt move amount is cleared always for all axes.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clr3dplsmov(unsigned short FlibHndl, short type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the special handle feed mode number to clear handle interrupt pulse amount.

    1 : Tool axis perpendicular direction mode X axis direction (for general and first parallel axis)
    2 : Tool axis perpendicular direction mode Y axis direction (for general and first parallel axis)
    3 : Tool axis direction mode (for general and first parallel axis)
    4 : Tool tip center rotation mode A, B axis (for general and first parallel axis)
    5 : Tool tip center rotation mode C axis (for general and first parallel axis)
    6 : Tool axis perpendicular direction mode X axis direction (for second parallel axis)
    7 : Tool axis perpendicular direction mode Y axis direction (for second parallel axis)
    8 : Tool axis direction mode (for second parallel axis)
    9 : Tool tip center rotation mode A, B axis (for second parallel axis)
    10 : Tool tip center rotation mode C axis (for second parallel axis)
    -1 : All mode

    ERRORS

    Code Description
    EW_DATA Data error
    Special handle feed mode number(type) is wrong.
    EW_NOOPT No option
    The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary.

    position\cnc_clr5axpls

    Clears the pulse amount for the manual feed for 5-axis machining.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clr5axpls(unsigned short FlibHndl, short type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the type of pulse amount to be cleared.

    type Pulse amount
    1 Tip center (C1)
    2 Tip center (C2)
    3 Tool axis (TD)
    4 Tool axis (R1)
    5 Tool axis (R2)
    6 Table (VR)
    7 Table (H1)
    8 Table (H2)
    -1 All pulse amount

    ERRORS

    Code Description
    EW_NUMBER the clear pulse type(type) is wrong.
    EW_NOOPT No option
    The extended driver/library function and the manual feed for 5-axis machining are necessary.

    position\cnc_distance

    Reads the amount of distance to go of axis specified with "axis". The amount of distance to go is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an amount of distance to go of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the amount of distance to go can be acquired in the cnc_getfigure function.

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    • The read amount of distance to go is twice as big as the actual one except specifying diameter of linear axis in T series.
    • Power Mate i
    • The read amount of distance to go is twice as big as the actual one.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_distance(unsigned short FlibHndl, short axis, short length, ODBAXIS *distance);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    distance out

    Pointer to the ODBAXIS structure including the number of distance to go of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* number of distance to go of controlled axis. */
    } ODBAXIS ;                     /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    distance out

    Pointer to the ODBAXIS structure including the number of distance to go of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* number of distance to go of controlled axis. */
    } ODBAXIS ;                     /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_exaxisname

    Reads the name of controlled axis and spindle name from 1st by the specified (*num), with supporting "extended axis name".

    After execution, "(*num)" will have the actual number of axes in case that "(*num)" is specified with the number that is larger than the current effective number of axes. In case that "(*num)" is specified with the number that is smaller than the current effective number of axes, this function reads only the number of data specified by "(*num)".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_exaxisname(unsigned short FlibHndl, short type, short *num, char (*axname)[4]);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of axis name to be read.

    0 : Controlled axis name
    1 : Spindle name
    num in/out

    Specify the pointer for the variable that stores the number of axes to be read. This function will return the actual read number of axes after the execution.

    axname out

    Specify the pointer for the array of char[4] type data. 4 byte area is required for each axis name. The acquired axis name is ASCII string and the string is NULL terminated. The array of this char[4] is required by specified (*num).


    ERRORS

    Code Description
    EW_LENGTH Data block error
    Number of axis(*num) is less or equal 0.
    EW_ATTRIB Data attribute error
    Kind of data(type) is wrong.

    position\cnc_exaxisname2

    Reads the name of controlled axis and spindle name from 1st by the specified (*num), with supporting "extended axis name".

    After execution, "(*num)" will have the actual number of axes in case that "(*num)" is specified with the number that is larger than the current effective number of axes. In case that "(*num)" is specified with the number that is smaller than the current effective number of axes, this function reads only the number of data specified by "(*num)".

    The acquisition method(absolute axis or relative axis) of name can specify by argument(absolute).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_exaxisname2(unsigned short FlibHndl, short type, short absolute, short *num, char (*axname)[4]);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of axis name to be read.

    0 : Controlled axis name
    1 : Spindle name
    absolute in

    Specify whether to acquire by a relative axis or an absolute axis.

    0 : Relative axis
    1 : Absolute axis
    num in/out

    Specify the pointer for the variable that stores the number of axes to be read. This function will return the actual read number of axes after the execution.

    axname out

    Specify the pointer for the array of char[4] type data. 4 byte area is required for each axis name. The acquired axis name is ASCII string and the string is NULL terminated. The array of this char[4] is required by specified (*num).


    ERRORS

    Code Description
    EW_LENGTH Data block error
    Number of axis(*num) is less or equal 0.
    EW_ATTRIB Data attribute error
    Kind of data(type) is wrong.

    position\cnc_machine

    Reads the machine position data of axis specified with "axis". The machine position is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an machine position of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the machine position can be acquired in the cnc_getfigure function.

    • Series 15/15i
    • The relation to the read machine position, and amount of servo delay and acceleration/deceleration delay follows setting the CNC parameter of the following description.

    • Series 16/18/21, 16i/18i/21i, 16i/18i-W, 0i-A/B/C, Power Mate i
    • Amount of servo delay and acceleration/deceleration delay is always included in the read machine position.

    • Series 30i/31i/32i, 0i-D/F, Power Motion i-A
    • Amount of servo delay and acceleration/deceleration delay is not included in the read machine position.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_machine(unsigned short FlibHndl, short axis, short length, ODBAXIS *machine);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis (m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    machine out

    Pointer to the ODBAXIS structure including the machine position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Machine position data of controlled axis. */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis (m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    machine out

    Pointer to the ODBAXIS structure including the machine position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Machine position data of controlled axis. */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_prstwkcd

    Presets the word coordinate selecting in CNC(absolute position).
    Preset data is specified by "data[0]" in "IDBWRA".

    It is possible to make preset to all axes at a time by specifying ALL_AXES for "type". In that case, an preset data of each axis is specified by the data array in IDBWRA.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_prstwkcd(unsigned short FlibHndl, short length, IDBWRA *prstwkcd);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IDBWRA structure)

    IDBWRA

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F
    • n = Maximum controlled axes
      (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    prstwkcd out

    Pointer to the IDBWRA structure to be set work coordinate system of the controlled axes. The IDBWRA structure is as follows.

    typedef struct idbwra {
            short   datano;                 /* Not used. */
            short   type;                   /* Axis number. */
            long    data[MAX_AXIS];         /* Preset data. */
    } IDBWRA ;    /* MAX_AXIS is the maximum controlled axes. */
    
    type
    Specify axis number to make preset.
    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    data
    Specify value to make preset.
    data[0],..,data[m-1] : for all axes
    data[0] : for each axis
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IDBWRA structure)

    IDBWRA

    for each axis for all axes

    n = Maximum controlled axes (The data for current controlled axes are valid.)

    prstwkcd out

    Pointer to the IDBWRA structure to be set work coordinate system of the controlled axes. The IDBWRA structure is as follows.

    typedef struct idbwra {
        short   datano;                 /* Not used. */
        short   type;                   /* Axis number. */
        long    data[MAX_AXIS];         /* Preset data. */
    } IDBWRA ;    /* MAX_AXIS is the maximum controlled axes. */
    
    type
    Specify axis number to make preset.
    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    data
    Specify value to make preset.
    data[0],..,data[m-1] : for all axes
    data[0] : for each axis

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBWRA structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (type) is improper.
    EW_DATA data error
    The content of "data" is out of range which can be specified.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The axis number(0 -) which error occurred will be set onto the member, err_dtno of ODBERR structure.
    EW_NOOPT no option
    The work coordinate system preset function and the extended driver/library function are necessary.
    EW_REJECT(Series 16i/18i-W) CNC execution denied

    position\cnc_rd3dmovrlap

    Reads the movement amount (generally for 5 axes, in case of parallel axis, 5 + 5 = 10 axes) about 3-dimensional handle feed.

    The number of each axis and the movement amount are stored respectively in "axes" and "data" of "ODB3DHDL".

    The places of decimal points can be got by cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dmovrlap(unsigned short FlibHndl, ODB3DHDL *hdlmove);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hdlmove out

    Pointer to the ODB3DHDL structure including the movement amount of each axis. The ODB3DHDL structure is as follows.

    typedef struct odb3dhdl {
            short   axes[5] ;               /* Axis number(0 -) */
            long    data[5] ;               /* Movement amount */
    } ODB3DHDL ;
    
    ODB3DHDL hdlmove[2] ;
               /* hdlmove[0] : for general and first parallel axis */
               /* hdlmove[1] : for second parallel axis */
    
    axes
    Axis number(0 -) is set.
    data
    Handle interrupt move amount is set.

    ERRORS

    Code Description
    EW_NOOPT No option
    The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary.

    position\cnc_rd3dofschg

    Read the modification of tool length compensation amount in tool axis direction.

    The places of decimal points can be got by cnc_getfigure function specified tool offset.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dofschg(unsigned short FlibHndl, long *ofschg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    ofschg out

    Specify the address of the array to store the modification of tool length compensation amount in tool axis direction. Actual modification of tool length compensation amount in tool axis direction being read is stored after this function call.

    long    ofschg[2] ;
                   /* ofschg[0] : for general and parallel axes */
                   /* ofschg[1] : (not used) */
    

    ERRORS

    Code Description
    EW_NOOPT No option
    The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary.

    position\cnc_rd3dpulse

    Reads the handle interrupt pulse amount about 3-dimensional handle feed.

    The handle interrupt pulse amount in special handle feed mode(G156#0, #1,#2/DI) is stored in each member of "ODB3DPLS".

    Special handle feed mode Interrupt pulse amount stored
    Tool axis perpendicular direction mode X axis direction right_angle_x
    Tool axis perpendicular direction mode Y axis direction right_angle_y
    Tool axis direction mode tool_axis
    Tool tip center rotation mode A, B axis tool_tip_a_b
    Tool tip center rotation mode C axis tool_tip_c

    The places of decimal points can be got by cnc_getfigure function specified tool offset.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dpulse(unsigned short FlibHndl, ODB3DPLS *hdlpulse);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    hdlpulse out

    Pointer to the ODB3DPLS structure including the handle interrupt pulse amount of each mode. The ODB3DPLS structure is as follows.

    typedef struct odb3dpls {
        long    right_angle_x ; /* Tool axis perpendicular
                                   direction mode X axis direction */
        long    right_angle_y ; /* Tool axis perpendicular
                                   direction mode Y axis direction */
        long    tool_axis ;     /* Tool axis direction mode */
        long    tool_tip_a_b ;
                        /* Tool tip center rotation mode A, B axis */
        long    tool_tip_c ;
                        /* Tool tip center rotation mode C axis */
    } ODB3DPLS ;
    
    ODB3DPLS hdlpulse[2] ;
                /* hdlpulse[0] : for general and first parallel axis */
                /* hdlpulse[1] : for second parallel axis */
    

    ERRORS

    Code Description
    EW_NOOPT No option
    The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary.

    position\cnc_rd3dtooltip

    Reads the absolute position of the tool tip coordinates about 3-dimensional handle feed.

    The number of each axis and the tool tip coordinates are stored respectively in "axes" and "data" of "ODB3DHDL".

    The places of decimal points can be got by cnc_getfigure function.

    The relation to the read tool tip coordinates, amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay follows setting the CNC parameter of the following description.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd3dtooltip(unsigned short FlibHndl, ODB3DHDL *tooltip);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tooltip out

    Pointer to the ODB3DHDL structure including the tool tip coordinates of the controlled axes. The ODB3DHDL structure is as follows.

    typedef struct odb3dhdl {
            short   axes[5] ;       /* Axis number(0 -) */
            long    data[5] ;       /* Tool tip coordinates */
    } ODB3DHDL ;
    
    ODB3DHDL tooltip[2] ;
               /* tooltip[0] : for general and first parallel axis */
               /* tooltip[1] : for second parallel axis */
    
    axes
    Axis number(0 -) is set.
    data
    Tool tip coordinates is set.

    ERRORS

    Code Description
    EW_NOOPT No option
    The 3-dimensional handle feed function and the extended driver/library function are necessary. Besides, either the manual handle feed function or the manual handle interrupt function is necessary.

    position\cnc_rd5axmandt

    Reads the data for the manual feed for 5-axis machining.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd5axmandt(unsigned short FlibHndl, ODB5AXMAN *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf out

    Specify the pointer to the ODB5AXMAN structure to store the information of the tool tip coordinates of the manual feed for 5-axis machining.
    The ODB5AXMAN structure is as follows.

    typedef struct odb5axman {
        short   type1; /* axis number of 1st linear axis */
        short   type2; /* axis number of 2nd linear axis */
        short   type3; /* axis number of 3rd linear axis */
        long    data1; /* Tip position of 1st linear axis */
        long    data2; /* Tip position of 2nd linear axis */
        long    data3; /* Tip position of 3rd linear axis */
        long    c1;    /* Tip center C1 */
        long    c2;    /* Tip center C2 */
        long    dummy; /* unused */
        long    td;    /* Tool axis TD */
        long    r1;    /* Tool axis R1 */
        long    r2;    /* Tool axis R2 */
        long    vr;    /* Table VR */
        long    h1;    /* Table H1 */
        long    h2;    /* Table H2 */
    } ODB5AXMAN ;
    
    type1
    Axis number of 1st linear axis
    type2
    Axis number of 2nd linear axis
    type3
    Axis number of 3rd linear axis
    data1
    Tip position of 1st linear axis
    Tip position is stored.
    The unit is the same as the axis of absolute coordinate which was set for type1.
    data2
    Tip position of 2nd linear axis
    Tip position is stored.
    The unit is the same as the axis of absolute coordinate which was set for type2.
    data3
    Tip position of 3rd linear axis
    Tip position is stored.
    The unit is the same as the axis of absolute coordinate which was set for type3.
    c1
    Pulse amount of tip center(C1) is stored.
    The unit is the same as the axis of absolute coordinate which was set in parameter No.19681.
    c2
    Pulse amount of tip center(C2) is stored.
    The unit is the same as the axis of absolute coordinate which was set in parameter No.19686.
    dummy
    unused
    td
    Pulse amount of tool axis(TD) is stored.
    r1
    Pulse amount of tool axis(R1) is stored.
    r2
    Pulse amount of tool axis(R2) is stored.
    vr
    Pulse amount of table(VR) is stored.
    h1
    Pulse amount of table(H1) is stored.
    h2
    Pulse amount of table(H2) is stored.

    The unit of td, r1, r2, vr, h1, and h2 are different according to the value of parameter No.19697.
    The unit is the same as the axis of absolute coordinate which was set for the corresponding type1, type2, and type3.


    The value of parameter No.19697 td and vr r1 and h1 r2 and h2
    1 type1 type2 type3
    2 type2 type3 type1
    3 type3 type1 type2

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function and the manual feed for 5-axis machining are necessary.

    position\cnc_rd5axovrlap

    Reads the machine axis movement for the manual feed of 5-axis machining.

    The axis number(axis) should be specified as 1..max controlled axes (for reading each axis), or -1 (for reading all axes once).

    The unit of machine axis is the same as absolute coordinate value.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd5axovrlap(unsigned short FlibHndl, short axis, short length, ODBAXIS *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 16i/18i/21i
    • n = Maximum controlled axes

    buf out

    Specify the pointer to the ODBAXIS structure to store the machine axis movement of the manual feed for 5-axis machining.
    The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* amount of machine axes movement */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB Data attribute error
    The specification of axis number (axis) is improper.
    EW_NOOPT No option
    The extended driver/library function and the manual feed for 5-axis machining are necessary.

    position\cnc_rdaxisdata

    Reads various data relating servo axis/spindle axis that is got by cnc_rdposition, cnc_rdspeed, cnc_rdsvmeter, cnc_rdspmeter, cnc_rdhndintrpt, with supporting "extended axis name".

    You have to specify the argument "cls" with the data class to be read, array of short, "type[]" with the kind of data to be read. The number of the array must be specified by the argument "num". The data kind that can be read once is up to 4. If "num" exceeds 4, this function will return the error, EW_ATTRIB.

    The argument "(*len)" should be specified with the number of axes to be read. According to "cls", "(*len)" should be specified as follows.

      1. In case that "cls" is specified with Position(=1), Servo(=2), Spindle(=3):

      This function reads the data from first axis by the specified number of axes. After execution, "(*len)" will have the actual number of axes in case that "(*len)" is specified with the number that is larger than the current effective number of axes. In case that "(*len)" is specified with the number that is smaller than the current effective number of axes, this function reads only the number of data specified by "(*len)".

      2. In case that "cls" is specified with Selected spindle(=4), Speed(=5):

      This function always reads only one axis data. In case that Selected spindle is specified but there is not a selected spindle, this function will set "(*len)" with 0.

    The read data will be stored on the array of ODBAXDATA structure specified by the argument "axdata[]". The number of members of this array must be "num" x "(*len)". The read data will be stored on the array, by the number of specified "(*len)" and order of specified "type[]" like as follows:

    Data of type[0] : axdata[ 0] ,..,axdata[ (*len)-1]
    Data of type[1] : axdata[ (*len)] ,..,axdata[ 2 x (*len)-1]
    Data of type[2] : axdata[ 2 x (*len)] ,..,axdata[ 3 x (*len)-1]
    Data of type[3] : axdata[ 3 x (*len)] ,..,axdata[ 4 x (*len)-1]

    Even in case that specified "(*len)" is smaller than the actual number of axes, the data will be stored on the array according to the "(*len)" that was specified at calling of this function.

    Example of arguments)

      In case of reading Absolute position, Machine position, Relative position:

      short types[3] = {0, 1, 2}; /* Absolute, Machine, Relative */
      len = 3;                    /* Specify 3 axes */
      ODBAXDT axdata[3*3];
      cnc_rdaxisdata(h, 1, types, 3, &len, axdata);
      

      The contents of the array "axdata" will be as follows.

      If the current effective number of axes is 2, (*len) will be returned 2 and array for 3rd axis(axdata[2], [5], [8]) will have no data after the execution.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdaxisdata(unsigned short FlibHndl, short cls, short* type, short num, short* len, ODBAXDT* axdata);


    ARGUMENTS


    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    cls in

    Specify the class of data to be read.

    1 : Position value
    2 : Servo
    3 : Spindle
    4 : Selected spindle
    5 : Speed
    type in

    Specify the pointer for the array that specifies the kind of data to be read. The following value can be specified according to "cls".

      cls = 1 (Position value)
      0 : Absolute position
      1 : Machine position
      2 : Relative position
      3 : Distance to go
      4 : Handle interruption(Input unit)
      5 : Handle interruption(Output unit)
      6 : Start point of program restart
      7 : Distance to go of program restart
      8 : Start point of block restart
      9 : Distance to go of block restart

      cls = 2 (Servo)
      0 : Servo load meter
      1 : Load current (% unit)
      2 : Load current (Ampere unit)

      cls = 3 (Spindle) and cls = 4 (Selected spindle)
      0 : Spindle load meter
      1 : Spindle motor speed
      2 : Spindle speed (according to parameter 3799#2)
      3 : Spindle speed (got from Spindle motor speed)
      4 : Spindle load meter (average of each 250ms)
      5 : Spindle load meter(maximum value)
      6 : Spindle load meter(maximum value)(average of each 250ms)
      7 : Time that spindle can continue processing
      Data by 5, 6, 7 will be influenced by parameter No.4542#7.
      So, the value of road meter (type = 0) might exceed maximum value (type = 5,6) depending on timing in which data is acquired.

      cls = 5 (Speed)
      0 : Feed rate(F)(Feed per minute)
      1 : Spindle speed(S)
      2 : Jog speed/Dry run speed
      3 : Tool tip speed
      4 : Rotation speed of servo motor
      5 : Feed rate(F/S) Note
      Note) The unit follow the value of parameter No.3107#3 and No.3191#5.
      Judge the unit by "unit".
    num in

    Specify the number of array "type".

    len in/out

    Specify the pointer that stores the number of axes to be read.
    This function returns the actual read number of axes after the execution.

    axdata out

    Specify the pointer of the array of ODBAXDT structure. Number of "num" x "(*len)" must be required. The ODBAXDT structure is as follows.

    typedef struct odbaxdt {
            char    name[4];        /* axis name */
            long    data;           /* data */
            short   dec;            /* decimal point */
            short   unit;           /* unit of data */
            short   flag;           /* flags */
            short   reserve;        /* reserved */
    } ODBAXDT ;
    
    name
    Axis name will be stored in ASCII code.
    The string is NULL terminated.

    data
    Data to be read

    dec
    Decimal point of data
    In case that following "unit" is "rpm" or "%", this data is always 0.

    unit
    Unit of data
    0 : mm (Position value)
    1 : inch (Position value)
    2 : degree (Position value)
    3 : mm/minute (Feed rate(Feed per minute), jog/dry run speed, Tool tip speed)
    4 : inch/minute (Feed rate(Feed per minute), jog/dry run speed, Tool tip speed))
    5 : rpm (Spindle speed, spindle motor speed)
    6 : mm/round (Feed rate(Feed per revolution), jog/dry run speed, Tool tip speed))
    7 : inch/round (Feed rate(Feed per revolution), jog/dry run speed, Tool tip speed))
    8 : % (Load meter, load current)
    9 : Ampere (Load current)
    10 : Second (Time)

    flag
    Flags
    According to "cls", following value will be set.
      cls = 1 (Position value)
      bit 0 : Display state
      1 = Displayed on CNC screen : 0 = Not displayed on CNC screen
      bit 1 : Axis detaching state
      1 = enabled : 0 = disabled
      bit 2 : Interlock state
      1 = enabled : 0 = disabled
      bit 3 : Machine lock state
      1 = enabled : 0 = disabled
      bit 4 : Servo off state
      1 = enabled : 0 = disabled
      bit 5 : In-position check
      1 = Not in-position : 0 = In-position
      bit 6 : Mirror image state
      1 = enabled : 0 = disabled
      bit 7 : Diameter and radius setting switching function
      1 = switching : 0 = not switching
      bit 8 : High speed program check mode(only machine coordinate)
      1 = enabled : 0 = disabled
      bit 9 : Optional one axis approach by program restart
      1 = executing : 0 = not executing
      bit 10 : Restart coordinates display on the program restart screen(except machine coordinate)
      1 = possible : 0 = impossible (display "***********")
      bit 11 : Release state of axis(Flexible path axis assignment function)
      1 = enabled : 0 = disabled
      bit 12,..,15 : not used

      cls = 3, 4(Spindle, Selected spindle)
    type = 5,6,7(Spindle load meter(maximum value), Spindle load meter(maximum value)(average of each 250ms), Time that spindle can continue processing)
    bit 0 : Data judgment result
    1 = It has judged. : 0 = Unjudgment
    bit 1 : Presence of data
    1 = Exist : 0 = None
    bit 12,..,15 : not used

    cls = 5 (Speed)
    bit 0 : Spindle speed
    1 = spindle exists : 0 = spindle not exist
    bit 1 : Jog speed/Dry run speed
    1 = Dry run speed : 0 = Jog speed
    bit 2,..,15 : not used

    Others
    not used


    ERRORS

    Code Description
    EW_LENGTH Data block error
    Number of axis(*len) is less or equal 0.
    EW_NUMBER Data number error
    Data class(cls) is wrong.
    EW_ATTRIB Data attribute error
    Kind of data(type) is wrong, or The number of kind(num) exceeds 4.
    EW_NOOPT No option
    Required option to read data is not specified.

    position\cnc_rdaxisname

    Reads the axis names from 1st axis to the specified axis number.

    In case that "*data_num" is bigger than the current controlled axis number, this function sets the actual read axis number (the current controlled axis number) to "*data_num" variable after execution. And in case that "*data_num" is smaller than the current controlled axis number, this function reads data for the specified axis number which is specified by "*data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdaxisname(unsigned short FlibHndl, short *data_num, ODBAXISNAME *axisname);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    Specify the pointer to the number of data to be read. This function returns the number of data which was read actually.

    axisname out

    Specify the pointer to the array of ODBAXISNAME structure to store the axis names. The number of array must be equal to "*data_num".

    The ODBAXISNAME structure is as follows.
    typedef struct odbaxisname {
        char name ;         /* axis name */
        char suff ;         /* subscript of axis name */
    } ODBAXISNAME ;
    
    name
    Axis name is stored.
    suff
    Subscript of the axis name is stored.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The axis number (*data_num) is 0 or less.

    position\cnc_rddynamic

    Read various data which changes at CNC operation at a time. The data which can be read is as follows.

    Data Function used for reading individually
    Alarm status cnc_alarm
    Program number in executing cnc_rdprgnum
    Program number of the main program cnc_rdprgnum
    Sequence number cnc_rdseqnum
    Actual feed rate cnc_actf
    Actual spindle speed cnc_acts
    Absolute position data of controlled axis (2) cnc_absolute2
    Machine position data of controlled axis cnc_machine
    Relative position data of controlled axis (2) cnc_relative2
    Amount of distance to go of controlled axis cnc_distance

    The formats of each data are same as "Function used for reading individually". Refer to each function for details.

    The data concerning the axis is read by specified with axis. Each data is stored in oaxis structure in ODBDY.

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, various data concerning the axis is stored in each array of faxis inside of ODBDY.

    The decimal point position of the various data concerning the axis can be acquired in the cnc_getfigure function.

  • Series 15i
    • This function cannot read all alarm status.
      Please use cnc_rddynamic2 function in order to read all alarm status.
      it is necessary to switch API to the one for the program number 8 digits. See "Program number 8 digits" for details.

  • Series 16/18/16i/18i, Power Mate i
    • it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits. See "Program number 8 digits" for details.

  • Series 16i/18i-W
    • the data corresponding to "Actual spindle speed", "Amount of distance to go of controlled axis" cannot be got.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddynamic( unsigned short FlibHndl, short axis, short length, ODBDY *rddynamic );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)

    length in

    Specify the length of the data block(size of ODBDY structure)

    ODBDY

    for each axis
    for program number 4 digits for program number 8 digits
    for all axes
    for program number 4 digits for program number 8 digits

    n = Maximum controlled axes (The data for current controlled axes are valid)

    rddynamic out

    Pointer to the ODBDY structure including various data. The ODBDY structure is as follows.

    For program number 4 digits
    
    typedef struct odbdy {
            short  dummy ;     /* not used                */
            short  axis ;      /* axis number             */
            short  alarm ;     /* alarm status            */
            short  prgnum ;    /* current program number  */
            short  prgmnum ;   /* main program number     */
            long   seqnum ;    /* current sequence number */
            long   actf ;      /* actual feedrate         */
            long   acts ;      /* actual spindle speed    */
            union {
                struct {
                    long  absolute[MAX_AXIS] ; /* absolute */
                    long  machine[MAX_AXIS] ;  /* machine  */
                    long  relative[MAX_AXIS] ; /* relative */
                    long  distance[MAX_AXIS] ; /* distance to go */
                } faxis ; /* In case of all axes */
                struct {
                    long  absolute ; /* absolute */
                    long  machine ;  /* machine  */
                    long  relative ; /* relative */
                    long  distance ; /* distance to go */
                } oaxis ; /* In case of 1 axis */
            } pos ;
    } ODBDY ;              /* MAX_AXIS is the maximum controlled axes. */
    
    
    For program number 8 digits
    
    typedef struct odbdy {
            short  dummy ;     /* not used                */
            short  axis ;      /* axis number             */
            short  alarm ;     /* alarm status            */
            long   prgnum ;    /* current program number  */
            long   prgmnum ;   /* main program number     */
            long   seqnum ;    /* current sequence number */
            long   actf ;      /* actual feedrate         */
            long   acts ;      /* actual spindle speed    */
            union {
                struct {
                    long  absolute[MAX_AXIS] ; /* absolute */
                    long  machine[MAX_AXIS] ;  /* machine  */
                    long  relative[MAX_AXIS] ; /* relative */
                    long  distance[MAX_AXIS] ; /* distance to go */
                } faxis ; /* In case of all axes */
                struct {
                    long  absolute ; /* absolute */
                    long  machine ;  /* machine  */
                    long  relative ; /* relative */
                    long  distance ; /* distance to go */
                } oaxis ; /* In case of 1 axis */
            } pos ;
    } ODBDY ;                       /* MAX_AXIS is the maximum controlled axes. */
    
      dummy
      Not used
      axis
      Axis number
      The read axis number is returned.
      alarm
      Alarm status
      The meaning of each bit is as follows.

      • Series 15/15i
      • #00 : Background P/S
        #01 : Foreground P/S
        #02 : Overheat alarm (Only Series 15)
        #03 : Sub-CPU error (Only Series 15)
        #04 : Syncronized error
        #05 : Parameter switch on
        #06 : Overtravel,Ext. data
        #07 : PMC error
        #08 : External alarm message
        #09 : (Not used)
        #10 : Serious P/S
        #11 : (Not used)
        #12 : Servo alarm
        #13 : I/O error
        #14 : Power off parameter set
        #15 : System error

      • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
      • #00 : P/S alarm 100
        #01 : P/S alarm 000
        #02 : P/S alarm 101
        #03 : P/S alarm except above
        #04 : Overtravel alarm
        #05 : Overheat alarm
        #06 : Servo alarm
        #07 : System alarm
        #08 : APC alarm
        #09 : Spindle alarm
        #10 : P/S alarm 5000, Punch press alarm
        #11 : Laser alarm
        #12 : (Not used)
        #13 : (Not used)
        #14 : (Not used)
        #15 : External alarm message

      • Series 16i/18i-W
      • #00 : P/S alarm
        #01 : Overtravel alarm
        #02 : Servo alarm
        #03 : (Not used)
        #04 : Overheat alarm
        #05 : Stroke limit - 1
        #06 : Stroke limit - 2
        #07 : Edit alarm
        #08 : APC alarm
        #09 : System alarm
        #10 : P/S 5000 ... alarm
        #11 : (Not used)
        #12 : (Not used)
        #13 : (Not used)
        #14 : External alarm
        #15 : Reverse control alarm

      • Series 30i, 0i-D/F, PMi-A
      • #00 : Parameter switch on (SW)
        #01 : Power off parameter set (PW)
        #02 : I/O error (IO)
        #03 : Foreground P/S (PS)
        #04 : Overtravel,External data (OT)
        #05 : Overheat alarm (OH)
        #06 : Servo alarm (SV)
        #07 : Data I/O error (SR)
        #08 : Macro alarm (MC)
        #09 : Spindle alarm (SP)
        #10 : Other alarm(DS) (DS)
        #11 : Alarm concerning Malfunction prevent functions (IE)
        #12 : Background P/S (BG)
        #13 : Syncronized error (SN)
        #14 : (reserved)
        #15 : External alarm message (EX)

      prgnum
      Program number under execution
      (It is the selected program number while automatic operation stopping)
      prgmnum
      Main program number (It is invalid in Series 15)
      seqnum
      Current sequence number
      actf
      Actual feed rate of the controlled axes
      acts
      Actual spindle speed data(It is invalid in Series 16i/18i-W, Power Mate i-H)
      absolute
      Absolute position of the controlled axes
      machine
      Machine position of the controlled axes
      relative
      Relative position of the controlled axes
      distance
      Amount of distance to go of the controlled axes (It is invalid in Series 16i/18i-W)

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBDY structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_rddynamic2

    Reads various data which changes at CNC operation at a time.

    This function is the improved version of the cnc_rddynamic function. Please use this function because the cnc_rddynamic function cannot read all alarm status of Series 15i. The data which can be read is as follows.

    Data Function used for reading individually
    Alarm status cnc_alarm2
    Program number in executing cnc_rdprgnum
    Program number of the main program cnc_rdprgnum
    Sequence number cnc_rdseqnum
    Actual feed rate cnc_actf
    Actual spindle speed cnc_acts
    Absolute position data of controlled axis (2) cnc_absolute2
    Machine position data of controlled axis cnc_machine
    Relative position data of controlled axis (2) cnc_relative2
    Amount of distance to go of controlled axis cnc_distance

    The formats of each data are same as "Function used for reading individually". Refer to each function for details.

    The data concerning the axis is read by specified with axis. Each data is stored in oaxis structure in ODBDY2.

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, various data concerning the axis is stored in each array of faxis inside of ODBDY2.

    The decimal point position of the various data concerning the axis can be acquired in the cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddynamic2( unsigned short FlibHndl, short axis, short length, ODBDY2 *rddynamic );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)

    length in

    Specify the length of the data block(size of ODBDY2 structure)

    ODBDY2

    for each axis for all axes

    n = Maximum controlled axes (The data for current controlled axes are valid.)

    rddynamic out

    Pointer to the ODBDY2 structure including various data. The ODBDY2 structure is as follows.

    typedef struct odbdy2 {
        short  dummy ;     /* not used                */
        short  axis ;      /* axis number             */
        long   alarm ;     /* alarm status            */
        long   prgnum ;    /* current program number  */
        long   prgmnum ;   /* main program number     */
        long   seqnum ;    /* current sequence number */
        long   actf ;      /* actual feedrate         */
        long   acts ;      /* actual spindle speed    */
        union {
            struct {
                long  absolute[MAX_AXIS] ; /* absolute */
                long  machine[MAX_AXIS] ;  /* machine  */
                long  relative[MAX_AXIS] ; /* relative */
                long  distance[MAX_AXIS] ; /* distance to go */
            } faxis ; /* In case of all axes */
            struct {
                long  absolute ; /* absolute */
                long  machine ;  /* machine  */
                long  relative ; /* relative */
                long  distance ; /* distance to go */
            } oaxis ; /* In case of 1 axis */
        } pos ;
    } ODBDY2 ;            /* MAX_AXIS is the maximum controlled axes. */
    
      dummy
      Not used
      axis
      Axis number
      The read axis number is returned.
      alarm
      Alarm status
      The meaning of each bit is as follows.

      • Series 15i
      • #00 : Background P/S
        #01 : Foreground P/S
        #02 : Overheat alarm
        #03 : Sub-CPU error
        #04 : Syncronized error
        #05 : Parameter switch on
        #06 : Overtravel,Ext. data
        #07 : PMC error
        #08 : External alarm message
        #09 : (Not used)
        #10 : Serious P/S
        #11 : (Not used)
        #12 : Servo alarm
        #13 : I/O error
        #14 : Power off parameter set
        #15 : (Not used)
        #16 : (Not used)
        #17 : (Not used)
        #18 : (Not used)
        #19 : Macro alarm
        #20 : System alarm
        #21,..,#31 : (Not used)

      • Series 16i/18i/21i, 0i-A/B/C, Power Mate i (Ethernet Only)
      • #00 : P/S alarm 100
        #01 : P/S alarm 000
        #02 : P/S alarm 101
        #03 : P/S alarm except above
        #04 : Overtravel alarm
        #05 : Overheat alarm
        #06 : Servo alarm
        #07 : System alarm
        #08 : APC alarm
        #09 : Spindle alarm
        #10 : P/S alarm 5000, Punch press alarm
        #11 : Laser alarm
        #12 : (Not used)
        #13 : Rigid tap alarm
        #14 : (Not used)
        #15 : External alarm message
        #16,..,#31 : (Not used)

      • Series 30i, 0i-D/F, PMi-A
      • #00 : Parameter switch on (SW)
        #01 : Power off parameter set (PW)
        #02 : I/O error (IO)
        #03 : Foreground P/S (PS)
        #04 : Overtravel,External data (OT)
        #05 : Overheat alarm (OH)
        #06 : Servo alarm (SV)
        #07 : Data I/O error (SR)
        #08 : Macro alarm (MC)
        #09 : Spindle alarm (SP)
        #10 : Other alarm (DS)
        #11 : Alarm concerning Malfunction prevent functions (IE)
        #12 : Background P/S (BG)
        #13 : Syncronized error (SN)
        #14 : (reserved)
        #15 : External alarm message (EX)
        #16 : (reserved)
        #17 : (reserved)
        #18 : (reserved)
        #19 : PMC error (PC)
        #20 to 31 : (Not used)
      prgnum
      Program number under execution
      (It is the selected program number while automatic operation stopping)
      prgmnum
      Main program number
      seqnum
      Current sequence number
      actf
      Actual feed rate of the controlled axes
      acts
      Actual spindle speed data (It is invalid in Power Mate i-H)
      absolute
      Absolute position of the controlled axes
      machine
      Machine position of the controlled axes
      relative
      Relative position of the controlled axes
      distance
      Amount of distance to go of the controlled axes

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBDY structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_rdhndintrpt

    Reads the handle interruption values from 1st axis to the specified axis number.

    In case that "data_num" is bigger than the current controlled axis number, this function sets the actual read axis number (the current controlled axis number) to "data_num" variable after execution. And in case that "data_num" is smaller than the current controlled axis number, this function reads data for the specified axis number which is specified by "data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdhndintrpt(unsigned short FlibHndl, short type, short *data_num, ODBHND *hnd);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the data type.

    0 : input unit
    1 : output unit
    -1 : all type
    data_num in / out

    Specify the pointer to the number of data to be read.
    This function returns the number of data which was read actually.

    hnd out

    Specify the pointer to the array of ODBHND structure to store the handle interruption values.
    The number of array must be equal to "*data_num". The ODBHND structure is as follows.

    typedef struct odbhnd {
        POSELM  input;  /* input unit */
        POSELM  output; /* output unit */
    } ODBHND ;
    
    input
    The POSELM structure for the handle interruption value of input unit
    output
    The POSELM structure for the handle interruption value of output unit

    And the POSELM structure is as follows.

    typedef struct poselm {
        long    data;   /* handle interruption value */
        short   dec;    /* place of decimal point of handle interruption value */
        short   unit;   /* unit of handle interruption value */
        short   disp;   /* status of display */
        char    name;   /* axis name */
        char    suff;   /* subscript of axis name */
    } POSELM;
    
    data
    Handle interruption data
    dec
    Place of decimal point
    unit
    Unit
    0 : mm
    1 : inch
    2 : degree
    disp
    Status of display
    0 : not display in the CNC screen
    1 : display in the CNC screen
    name
    Axis name (ASCII)
    suff
    Subscript of axis name (ASCII)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The axis number (*data_num) is 0 or less.
    EW_ATTRIB Data attribute error
    Type of handle interruption value (type) is wrong.
    EW_NOOPT No option
    The handle interrupt function and the extended driver/library function are necessary.

    position\cnc_rdmovrlap

    Read the manual overlapped motion value based on the input unit and based on the output unit.

    All axes can be read at a time by specifying ALL_AXES for "axis". (It is impossible to read each axis) In that case, an manual overlapped motion value of each axis is stored in the data array of IODBOVL.

    The decimal point position of the manual overlapped motion value can be acquired in the cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmovrlap(unsigned short FlibHndl, short axis, short length, IODBOVL *movrlap);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.
    Only all axes specification can be specified.

    ALL_AXES : for all axes(ALL_AXES : -1)
    length in

    Specify the length of the data block(size of IODBOVL structure)

    IODBOVL

    n = Maximum controlled axes
    (The data for current controlled axes are valid.)

    movrlap out

    Pointer to the IODBOVL structure including the manual overlapped motion value of the controlled axes. The IODBOVL structure is as follows.

    typedef struct iodbovl {
        short   datano;                 /* Not used. */
        short   type;                   /* Axis number. */
        long    data[2][MAX_AXIS];      /* Manual overlapped motion value. */
    } IODBOVL ;                    /* MAX_AXIS is the maximum controlled axes. */
    
    datano
    Not used
    type
    Axis number(only ALL_AXES)
    data
    manual overlapped motion value
    Input unit : data[0][0] ,.., data[0][n-1]
    Output unit : data[1][0] ,.., data[1][n-1]
    Two kind of the manual overlapped motion value are acquired.

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBOVL structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.
    EW_NOOPT no option
    The handle interrupt function and the extended driver/library function are necessary.

    position\cnc_rdposition

    Reads the positions from 1st axis to the specified axis number.

    In case that "*data_num" is bigger than the current controlled axis number, this function sets the actual read axis number (the current controlled axis number) to "*data_num" variable after execution. And in case that "*data_num" is smaller than the current controlled axis number, this function reads data for the specified axis number which is specified by "*data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdposition(unsigned short FlibHndl, short type, short *data_num, ODBPOS *position);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the data type.

    0 : absolute position
    1 : machine position
    2 : relative position
    3 : distance to go
    -1 : all type
    data_num in / out

    Specify the pointer to the number of data to be read. This function returns the number of data which was read actually.

    position out

    Specify the pointer to the array of ODBPOS structure to store the positions. The number of array must be equal to "*data_num". The ODBPOS structure is as follows.

    typedef struct odbpos {
        POSELM  abs;    /* absolute position */
        POSELM  mach;   /* machine position  */
        POSELM  rel;    /* relative position */
        POSELM  dist;   /* distance to go    */
    } ODBPOS ;
    
      abs
      The POSELM structure for absolute position
      mach
      The POSELM structure for machine position
      rel
      The POSELM structure for relative position
      dist
      The POSELM structure for distance to go

    And the POSELM structure is as follows.

    typedef struct poselm {
        long    data;   /* position data */
        short   dec;    /* place of decimal point of position
                           data */
        short   unit;   /* unit of position data */
        short   disp;   /* status of display */
        char    name;   /* axis name */
        char    suff;   /* subscript of axis name */
    } POSELM;
    
      data
      Position data
      dec
      Place of decimal point
      unit
      Unit
      0 : mm
      1 : inch
      2 : degree
      disp
      Status of display
      0 : not display in the CNC screen
      1 : display in the CNC screen
      name
      Axis name (ASCII)
      suff
      Subscript of axis name (ASCII)

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The axis number (*data_num) is 0 or less.
    EW_ATTRIB Data attribute error
    Type of position (type) is wrong.

    position\cnc_rdspcss

    Reads the following data related to constant surface speed control on CNC side.

    Converted spindle speed value
    Specified surface speed value
    Clamp of maximum spindle speed value


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspcss(unsigned short FlibHndl, ODBCSS *css);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    css out

    Pointer to the ODBCSS structure including the constant surface speed control data. The ODBCSS structure is as follows.

    typedef struct odbcss {
            long    srpm;      /* Converted spindle speed value */
            long    sspm;      /* Specified surface speed value */
            long    smax;      /* Clamp of maximum spindle speed value */
    } ODBCSS ;
    

    ERRORS

    Code Description
    EW_NOOPT no option
    The constant surface speed control function and extended driver/library function is necessary.
    EW_VERSION Version mismatch between CNC and library
    Replace the library or CNC control software.
    EW_FUNC not available
    Replace the ethernet control software.

    position\cnc_rdspdlname

    Reads the spindle names from 1st spindle to the specified spindle number.

    In case that "*data_num" is bigger than all spindle number, this function sets the actual read spindle number (all spindle number) to "*data_num" variable after execution. And in case that "*data_num" is smaller than all spindle number, this function reads data for the specified spindle number which is specified by "*data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspdlname(unsigned short FlibHndl, short *data_num, ODBSPDLNAME *spdlname);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    Specify the pointer to the number of data to be read. This function returns the number of data which was read actually.

    spdlname out

    Specify the pointer to the array of ODBSPDLNAME structure to store the spindle names. The number of array must be equal to "*data_num".

    The ODBSPDLNAME structure is as follows.
    typedef struct odbspdlname {
        char    name;   /* spindle name */
        char    suff1;  /* subscript of spindle name 1 */
        char    suff2;  /* subscript of spindle name 2 */
        char    suff3;  /* reserved */
    } ODBSPDLNAME ;
    
    name
    Spindle name (ASCII)
    ASCII code 'S' is stored.
    suff1
    Subscript of spindle name 1(ASCII)
    In case of Series 16i/18i/21i, 0i, 30i and Power Mate i, the spindle number ('1', '2', ...) is stored.
    In case of Series 15i, the value which is defined by parameter (No. 5845, 5846) is stored.
    suff2
    Subscript of spindle name 2(ASCII)
    When the spindle switching function is available, the following ASCII code is stored.
    In case of main spindle : '1'
    In case of sub spindle : '2'
    When the spindle switching function is not available, NULL('\0') is stored.
    In case of Series 15i, data is stored. But it is invalid for the spindle name.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The spindle number (*data_num) is 0 or less.

    position\cnc_rdspdlspeed

    This function does the calculation for serial spindle by which the gear ratio was considered against the rotation speed of spindle motor. And the approximate values of spindle speed(rpm) for numbers of spindle which was specified by specified spindle or parameter are returned.
    But, only the first spindle becomes effective when there is no option of the multi spindle. In this function, the spindle speed is calculated by the following calculation expression.

    Spindle speed = Real speed(rpm)

    Maximum speed(rpm)
    * Maximum speed to gear(rpm)

    * The error might be included because of the approximate value calculation.

    To calculate the spindle speed correctly by the above calculation expression, it is necessary to set a correct value in the maximum speed(rpm) of spindle motor and the maximum speed(rpm) to the gear as follows. And the gear number under use must be notified to DI signal correctly.

    • When there is no option of the multi spindle
      • Maximum speed(rpm) of spindle motor
        No spindle switching function, main spindle with spindle switching function Parameter No.4020(S1)
        Sub spindle with spindle switching function Parameter No.4196(S1)

        The using gear number
        In case of gear selection mode M type of M system
        (The spindle is being controlled with CNC.)
        Distinguishes by DO signal F034#2,#1 and #0 which CNC outputs.
        In case of gear selection mode M type of M system
        (The spindle is being controlled with PMC.)
        Specify by the argument(gear_no) of this function.
        In case of gear selection mode T type of M system and T system
        The gear number is notified by DI signal G028#2 and #1.

        The maximum speed(rpm) to gear
        In case of gear selection mode M type of M system
        (The spindle is being controlled with CNC.)
        F034#0=1 Parameter No.3741
        F034#1=1 Parameter No.3742
        F034#2=1 Parameter No.3743
        In case of gear selection mode M type of M system
        (The spindle is being controlled with PMC.)
        gera_no=1 Parameter No.3741
        gera_no=2 Parameter No.3742
        gera_no=3 Parameter No.3743
        In case of gear selection mode T type of M system and T system G028#2=0, G028#1=0 Parameter No.3741
        G028#2=0, G028#1=1 Parameter No.3742
        G028#2=1, G028#1=0 Parameter No.3743
        G028#2=1, G028#1=1 Parameter No.3744

        * The gear selection mode of M system is shown as follows.

        M type without constant surface speed control option
        and
        Parameter No.3706#4=0
        T type with constant surface speed control option
        or
        Parameter No.3706#4=1


    • When there is an option of the multi spindle
      • Maximum speed(rpm) of spindle motor
        No spindle switching function, main spindle with spindle switching function 1st spindle Parameter No.4020(S1)
        2nd spindle Parameter No.4020(S2)
        3rd spindle Parameter No.4020(S3)
        4tf spindle Parameter No.4020(S4)
        Sub spindle with spindle switching function 1st spindle Parameter No.4196(S1)
        2nd spindle Parameter No.4196(S2)
        3rd spindle Parameter No.4196(S3)
        4th spindle Parameter No.4196(S4)

        The using gear number
        1st spindle The gear number is notified by DI signal G028#2 and #1.
        2nd spindle The gear number is notified by DI signal G029#0.
        3rd spindle The gear number is notified by DI signal G029#2.
        4th spindle The gear number is notified by DI signal G031#4.

        The maximum speed(rpm) to gear
        1st spindle G028#2=0,G028#1=0 Parameter No.3741
        G028#2=0,G028#1=1 Parameter No.3742
        G028#2=1,G028#1=0 Parameter No.3743
        G028#2=1,G028#1=1 Parameter No.3744
        2nd spindle G029#0=0 Parameter No.3811
        G029#0=1 Parameter No.3812
        3rd spindle G029#2=0 Parameter No.3831
        G029#2=1 Parameter No.3832
        4th spindle G031#4=0 Parameter No.3851
        G031#4=1 Parameter No.3852


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspdlspeed(unsigned short FlibHndl, short spdl_no, short gear_no, long *spdl_speed);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    spdl_no in

    Specify the spindle number which wants to be acquired.
    Specify -1 or spindle number(1-4).
    When -1 is specified, the spindle speed(rpm) from 1st spindle to the spindle setted by the parameter is acquired.
    If the spindle number not set by the parameter is specified, the return value becomes an error(EW_NUMBER).

    gear_no in

    Specify the gear number used by PMC spindle output control.
    Specify the value of 1-3. If you specifies excepting 1-3, the return value becomes an error(EW_ATTRIB).
    Moreover, only when all of undermentioned condition 1)-3) are satisfied, this argument is used as a gear number.

      1) No multi spindle option with M system
      2) Select the gear selection mode M type
      (Without constant surface speed control option, Parameter No.3706#4=0)
      3) Signal G033#7 is 1. (The spindle is being controlled with PMC.)
    spdl_speed out

    Pointer to variable to store the spindle speed(rpm).
    When you specify -1 for spindle number(spdl_no), prepare the array for amounts of the spindle setted by the parameter, and specify the top pointer.


    ERRORS

    Code Description
    EW_NUMBER The spindle number(spdl_no) is wrong.
    EW_ATTRIB The gear number(gear_no) is wrong.

    position\cnc_rdspeed

    Reads the actual feed rate and the actual rotational speed of the spindle.

    The spindle speed, which can be read in this function, is one of the main spindle that is dispalyed in the position screen of the CNC.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspeed(unsigned short FlibHndl, short type, ODBSPEED *speed);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the data type.

    0 : feed rate
    1 : spindle speed (The spindle function is not provided in Power Mate i-H.)
    -1 : all
    speed out

    Pointer to the ODBSPEED structure for the speed data. The ODBSPEED structure is as follows.

    typedef struct odbspeed {
        SPEEDELM    actf;   /* feed rate */
        SPEEDELM    acts;   /* spindle speed */
    } ODBSPEED ;
    
      actf
      SPEEDELM structure for the feed rate
      acts
      SPEEDELM structure for the spindle speed
      And the SPEEDELM structure is as follows.
    typedef struct speedelm {
        long    data;       /* speed data */
        short   dec;        /* place of decimal point*/
        short   unit;       /* unit */
        short   reserve;    /* */
        char    name;       /* name */
        char    suff;       /* subscript of name */
    } SPEEDELM;
    
      data
      Speed data
      dec
      Place of decimal point
      unit
      Unit
      0 : mm/min
      1 : inch/min
      2 : rpm
      3 : mm/rev
      4 : inch/rev
      name
      Name (ASCII)
      Feed rate : 'F'
      Spindle speed : 'S'
      suff
      Subscription of name (ASCII)
      When the multi spindle control function is available, in case of the spindle speed, the selected position coder number (ASCII format) is stored.

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    Type of data (type) is wrong.

    position\cnc_rdspgear

    Reads the gear ratio of the serial spindle. The gear ratio is stored in "data[0]" of "ODBSPN".

    All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no". In that case, an gear ratio of each serial spindle is stored in the data array of ODBSPN.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspgear(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLES : for each spindle
    • Series 15/15i, 16i/18i/21i, 16i/18i/21i, 0i-A/B/C
    • MAX_SPINDLES : 4

    • Series 30i, 0i-D/F
    • MAX_SPINDLES : 8

    • Power Mate i-D
    • MAX_SPINDLES : 1

    serialspindle out

    Pointer to the ODBSPN structure including the gear ratio of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
            short   datano;                 /* Spindle number. */
            short   type;                   /* Not used. */
            short   data[MAX_SPINDLES];     /* Spindle data. */
    } ODBSPN ;     /* MAX_SPINDLES is maximum number of spindle. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLES : for each spindle

    MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i.

    serialspindle out

    Pointer to the ODBSPN structure including the gear ratio of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
        short   datano;                 /* Spindle number. */
        short   type;                   /* Not used. */
        short   data[MAX_SPINDLES];     /* Spindle data. */
    } ODBSPN ;     /* MAX_SPINDLES is maximum number of spindle. */
    

    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of spindle number (sp_no) is illegal.

    position\cnc_rdspload

    Reads the load information of the serial spindle. The load information of the serial spindle is stored in "data[0]" of "ODBSPN".

    All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no". In that case, an load information of each serial spindle is stored in the data array of ODBSPN.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspload(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLE : for each spindle
    • Series 15/15i, 16i/18i/21i, 16i/18i/21i, 0i-A/B/C
    • MAX_SPINDLE : 4

    • Series 30i, 0i-D/F
    • MAX_SPINDLE : 8

    • Power Mate i-D
    • MAX_SPINDLE : 1

    serialspindle out

    Pointer to the ODBSPN structure including the load information of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
            short   datano;                 /* Spindle number. */
            short   type;                   /* Not used. */
            short   data[MAX_SPINDLE];      /* Spindle data. */
    } ODBSPN ;      /* MAX_SPINDLE is maximum number of spindle. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLE : for each spindle

    MAX_SPINDLE is maximum number of spindle. It becomes 8 in Series 30i.

    serialspindle out

    Pointer to the ODBSPN structure including the load information of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
        short   datano;                 /* Spindle number. */
        short   type;                   /* Not used. */
        short   data[MAX_SPINDLE];      /* Spindle data. */
    } ODBSPN ;      /* MAX_SPINDLE is maximum number of spindle. */
    

    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of spindle number (sp_no) is illegal.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    position\cnc_rdspmaxrpm

    Reads the maximum r.p.m. ratio of serial spindle. The gear ratio is stored in "data[0]" of "ODBSPN".

    All spindle can be read at a time by specifying ALL_SPINDLES for "sp_no". In that case, an maximum r.p.m. ratio of each serial spindle is stored in the data array of ODBSPN.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspmaxrpm(unsigned short FlibHndl, short sp_no, ODBSPN *serialspindle);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLES : for each spindle
    • Series 15/15i, 16i/18i/21i, 16i/18i/21i, 0i-A/B/C
    • MAX_SPINDLES : 4

    • Series 30i, 0i-D/F
    • MAX_SPINDLES : 8

    • Power Mate i-D
    • MAX_SPINDLES : 1

    serialspindle out

    Pointer to the ODBSPN structure including the maximum r.p.m. ratio of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
            short   datano;                 /* Spindle number. */
            short   type;                   /* Not used. */
            short   data[MAX_SPINDLES];     /* Spindle data. */
    } ODBSPN ;     /* MAX_SPINDLES is maximum number of spindle. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    sp_no in

    Specify spindle number to read.

    ALL_SPINDLES : for all spindles (ALL_SPINDLES: -1)
    1,..,MAX_SPINDLES : for each spindle

    MAX_SPINDLES is maximum number of spindle. It becomes 8 in Series 30i.

    serialspindle out

    Pointer to the ODBSPN structure including the maximum r.p.m. ratio of the serial spindle. The ODBSPN structure is as follows.

    typedef struct odbspn {
        short   datano;                 /* Spindle number. */
        short   type;                   /* Not used. */
        short   data[MAX_SPINDLES];     /* Spindle data. */
    } ODBSPN ;     /* MAX_SPINDLES is maximum number of spindle. */
    

    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of spindle number (sp_no) is illegal.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    position\cnc_rdspmeter

    Reads the spindle load meter data and the spindle motor speed data from 1st spindle to the specified spindle number.

    In case that "data_num" is bigger than the current spindle number, this function sets the actual read spindle number (the current spindle number) to "data_num" variable after execution. And in case that "data_num" is smaller than the current spindle number, this function reads data for the specified spindle number which is specified by "data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdspmeter(unsigned short FlibHndl, short type, short *data_num, ODBSPLOAD *loadmeter);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the data type.

    0 : spindle load meter data
    1 : spindle motor speed data
    -1 : all type
    data_num in / out

    Specify the pointer to the number of data to be read. This function returns the number of data which was read actually.

    loadmeter out

    Specify the pointer to the array of ODBSVLOAD structure to store the spindle load meter data and the spindle motor speed data. The number of array must be equal to "*data_num". The ODBSVLOAD structure is as follows.

    typedef struct odbspload {
        LOADELM     spload;     /* spindle load meter data */
        LOADELM     spspeed;    /* spindle motor data */
    } ODBSPLOAD ;
    
    svload
    The LOADELM structure for spindle load meter data
    spspeed
    The LOADELM structure for spindle motor speed data And the LOADELM structure is as follows.

    The LOADELM structure is as follows.

    typedef struct loadelm {
        long    data;       /* load meter data, motor speed */
        short   dec;        /* place of decimal point */
        short   unit;       /* unit */
        char    name;       /* spindle name */
        char    suff1;      /* subscript of spindle name 1 */
        char    suff2;      /* subscript of spindle name 2 */
        char    reserve;    /* */
    } LOADELM;
    
    data
    Load meter data, motor speed data
    dec
    Place of decimal point
    unit
    Unit
    0 : %
    1 : rpm
    name
    Spindle name (ASCII)
    ASCII code 'S' is stored.
    suff1

    Subscript of spindle name 1 (ASCII)

  • Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i
    • The spindle number ('1', '2', ...) is stored.

  • Series 15i
    • The value which is defined by parameter (No. 5845, 5846) is stored.

    suff2

    Subscript of spindle name 2 (ASCII)
    When the spindle switching function is available, the following ASCII code is stored.

    In case of main spindle : '1'
    In case of sub spindle : '2'

    When the spindle switching function is not available, NULL('\0') is stored.
    In case of Series 15, data is stored. But it is invalid for the spindle name.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The spindle number (data_num) is 0 or less.
    EW_ATTRIB Data attribute error
    Type of data (type) is wrong.

    position\cnc_rdsvmeter

    Reads the servo load meter data from 1st axis to the specified axis number.

    In case that "*data_num" is bigger than the servo axis number, this function sets the actual read axis number (the servo axis number) to "*data_num" variable after execution. And in case that "*data_num" is smaller than the servo axis number, this function reads data for the specified axis number which is specified by "*data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsvmeter(unsigned short FlibHndl, short *data_num, ODBSVLOAD *loadmeter);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in / out

    Specify the pointer to the number of data to be read. This function returns the number of data which was read actually.

    loadmeter out

    Specify the pointer to the array of ODBSVLOAD structure to store the servo load meter data. The number of array must be equal to "*data_num". The ODBSVLOAD structure is as follows.

    typedef struct odbsvload {
        LOADELM     svload;     /* servo load meter data */
    } ODBSVLOAD ;
    
    svload
    The LOADELM structure for servo load meter data

    And the LOADELM structure is as follows.

    typedef struct loadelm {
        long    data;    /* load meter data */
        short   dec;     /* place of decimal point */
        short   unit;    /* unit */
        char    name;    /* axis name */
        char    suff1;   /* subscript of axis name 1 */
        char    suff2;   /* subscript of axis name 2 */
        char    reserve; /* */
    } LOADELM;
    
    data
    Load meter data
    dec
    Place of decimal point
    unit
    Unit
    Always 0 (=%)
    name
    Axis name (ASCII)
    suff1
    Subscript of axis name(ASCII)
    suff2
    Not used

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The axis number (*data_num) is 0 or less.

    position\cnc_relative

    Reads the relative position data of axis specified with "axis". The relative position is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an relative position of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the relative position can be acquired in the cnc_getfigure function.

    • Series 15/15i
    • The relation to the read relative position, amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay follows setting the CNC parameter of the following description.
    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • Amount of Tool Length Compensation and Cutter Radius Compensation, and amount of servo delay and acceleration/deceleration delay is always included in the read relative position.
    • Series 16i/18i-W
    • Amounts of Wire diameter Compensation, amounts of servo delay and acceleration/deceleration delay is always included in the read relative position.
    • Series 30i/31i/32i, 0i-D/F, Power Motion i-A
    • Amount of Tool Length Compensation and Cutter Radius Compensation is always included in the read relative position. But, amount of servo delay and acceleration/deceleration delay is not included.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_relative(unsigned short FlibHndl, short axis, short length, ODBAXIS *relative);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    relative out

    Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Relative position data of controlled axis. */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    relative out

    Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
            short   dummy ;                 /* Not used. */
            short   type ;                  /* Axis number. */
            long    data[MAX_AXIS] ;        /* Relative position data of controlled axis. */
    } ODBAXIS ;                          /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_relative2

    Differences between functions of cnc_relative2 and functions of cnc_relative are described.

    The interface of function is similar to cnc_relative function.

    The cnc_relative function reads an relative actual position where the amount of all the tool offset was added to the command value. Therefore, the coodinates values called by cnc_relative and relative position displayed on the position display on CNC screen might be different by the setting of CNC parameter.

    The cnc_relative2 function reads the same value as the relative position diaplayed on the position display on CNC screen.

    (Note) Only when CNC control software supports the cnc_relative2 function at the special series and version, cnc_relative2 reads the same value as the relative position diaplayed on the position display on CNC screen. If CNC control software does not support this function, cnc_relative2 reads the same value returned by cnc_relative.

    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • Both cnc_relative and cnc_relative2 read the same value as the relative position displayed on the position display of CNC screen.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_relative2(unsigned short FlibHndl, short axis, short length, ODBAXIS *relative);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    relative out

    Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;           /* Not used. */
        short   type ;            /* Axis number. */
        long    data[MAX_AXIS] ;  /* Relative position data of controlled axis. */
    } ODBAXIS ;               /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    relative out

    Pointer to the ODBAXIS structure including the relative position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;           /* Not used. */
        short   type ;            /* Axis number. */
        long    data[MAX_AXIS] ;  /* Relative position data of controlled axis. */
    } ODBAXIS ;               /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_skip

    Reads the skipped position of axis specified with "axis". The skipped position is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an skipped position of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the skipped position can be acquired in the cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_skip(unsigned short FlibHndl, short axis, short length, ODBAXIS *skip);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    skip out

    Pointer to the ODBAXIS structure including the skipped position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* Skipped position data of controlled axis. */
    } ODBAXIS ;                     /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    skip out

    Pointer to the ODBAXIS structure including the skipped position data of the controlled axes. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;                 /* Not used. */
        short   type ;                  /* Axis number. */
        long    data[MAX_AXIS] ;        /* Skipped position data of controlled axis. */
    } ODBAXIS ;                     /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.
    EW_NOOPT(only Series 15/15i) No option
    The skip function is necessary.

    position\cnc_srvdelay

    Reads the servo delay amount of axis specified with "axis". The servo delay amount is stored in "data[0]" of "ODBAXIS".

    All axes can be read at a time by specifying ALL_AXES for "axis". In that case, an servo delay amount of each axis is stored in the data array of ODBAXIS.

    The decimal point position of the servo delay amount can be acquired in the cnc_getfigure function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_srvdelay(unsigned short FlibHndl, short axis, short length, ODBAXIS *srvdelay);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    srvdelay out

    Pointer to the ODBAXIS structure including the servo delay amount of controlled axis. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;             /* Not used. */
        short   type ;              /* Axis number. */
        long    data[MAX_AXIS] ;    /* Servo delay amount of controlled axis. */
    } ODBAXIS ;                 /* MAX_AXIS is the maximum controlled axes. */
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis number to read.

    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    length in

    Specify the length of the data block(size of ODBAXIS structure)

    ODBAXIS

    for each axis for all axes
    n = Maximum controlled axes (The data for current controlled axes are valid.)
    srvdelay out

    Pointer to the ODBAXIS structure including the servo delay amount of controlled axis. The ODBAXIS structure is as follows.

    typedef struct odbaxis {
        short   dummy ;             /* Not used. */
        short   type ;              /* Axis number. */
        long    data[MAX_AXIS] ;    /* Servo delay amount of controlled axis. */
    } ODBAXIS ;                 /* MAX_AXIS is the maximum controlled axes. */
    

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBAXIS structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (axis) is improper.

    position\cnc_wrrelpos

    Sets again relative position against the axis specified with "type". Preset data is specified by "data[0]" in "IDBWRR".

    If 0 is specified as preset data, it means origin(0 clear of relative position).

    It is possible to make preset to all axes at a time by specifying ALL_AXES for "type". In that case, an preset data of each axis is specified by the data array in IDBWRR.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrrelpos(unsigned short FlibHndl, short length, IDBWRR *wrrelpos);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IDBWRR structure)

    IDBWRR

    for each axis for all axes
    • Series 15/15i, 30i, 0i-D/F, PMi-A
    • n = Maximum controlled axes
      (The data for current controlled axes are valid.)

    • Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • n = Current controlled axes

    wrrelpos out

    Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.

    typedef struct idbwrr {
            short   datano;                 /* Not used. */
            short   type;                   /* Axis number. */
            long    data[MAX_AXIS];         /* Preset data. */
    } IDBWRR ;    /* MAX_AXIS is the maximum controlled axes. */
    
    type
    Specify axis number to make preset.
    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    data
    Specify value to make preset.
    data[0],..,data[m-1] : for all axes
    data[0] : for each axis
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IDBWRR structure)

    IDBWRR

    for each axis for all axes

    n = Maximum controlled axes (The data for current controlled axes are valid.)

    wrrelpos out

    Pointer to the IDBWRR structure to be preset the relative position data of the controlled axes. The IDBWRR structure is as follows.

    typedef struct idbwrr {
        short   datano;                 /* Not used. */
        short   type;                   /* Axis number. */
        long    data[MAX_AXIS];         /* Preset data. */
    } IDBWRR ;    /* MAX_AXIS is the maximum controlled axes. */
    
    type
    Specify axis number to make preset.
    ALL_AXES : for all axes(ALL_AXES : -1)
    1,..,m : for each axis(m : number of controlled axis)
    data
    Specify value to make preset.
    data[0],..,data[m-1] : for all axes
    data[0] : for each axis

    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBWRR structure(length) is illegal.
    EW_ATTRIB data attribute error
    The specification of axis number (type) is improper.
    EW_DATA data error
    The content of "data" is out of range which can be specified.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The axis number(0 -) at which error occurred will be set onto the member, err_dtno of ODBERR structure.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_REJECT CNC execution denied(Series 16i/18i-W)

    profibus\pbm_chg_mode

    Changes the operation mode


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_chg_mode( unsigned short FlibHndl, unsigned char chg_mode, OUT_CHGMODERESULT *chg_mode_result );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    chg_mode in

    operation mode

    0 : change it to "OFFLINE" mode
    64 : change it to "STOP" mode
    128 : change it to "CLEAR" mode
    192 : change it to "OPERATE" mode
    chg_mode_result out

    Specifies the pointer to the OUT_CHGMODERESULT structure to store the acquired parameter.
    The OUT_CHGMODERESULT structure is as follows.

    typedef struct _OUT_CHGMODERESULT{
        unsigned char   crnt_mode;
        unsigned char   pad;
        unsigned short  result;
    } OUT_CHGMODERESULT;
    
    crnt_mode
    Operation mode after changing
    0 : "OFFLINE" mode
    64 : "STOP" mode
    128 : "CLEAR" mode
    192 : "OPERATE" mode
    pad
    unused
    result
    Result
    0 : normally
    10 : error occurs
    11 : change in operation mode by the illegal order
    12 : power must be off


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    7 : a kind of operation mode is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_exe_subfunc

    Executes sub-function for setting


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_exe_subfunc( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    kind of sub-function

    0 : insertion of slot
    inserts a new slot before the specified slave station/slot
    1 : deletion of slot
    deletes the specified slave station/slot (The slot after that is blocked on.)
    10 : automatic setting of DI/DO size
    set the DI/DO size automatically after the specified slave/slot (effect in the same slave)
    20 : The SHIFT mode of module data length is invalidated.
    Does not newly reserves the area with a size of the specified "module_len".
    21 : The SHIFT mode of module data length is made effective.
    Newly reserves the area with a size of the specified "module_len".
    100 : refresh the information of slave station
    The slave exchange number set to each slave index number is permuted in order with a young exchange number.

    (note) about usage of slvslt_ind

    0 to 1 : slvslt_ind.slv_no and slvslt_ind.slt_no are used
    10 : slvslt_ind.slv_no and slvslt_ind.slt_no are used
    20 to 21 : slvslt_ind is not used
    100 : slvslt_ind is not used

    slvslt_ind in

    Specifies the pointer to the T_SLVSLT_IND structure.
    The T_SLVSLT_IND structure is as follows. When the slave station or slot module is set to type, this structure is used.

    typedef struct _T_SLVSLT_IND{
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLVSLT_IND;
    
    slv_no
    Station number of slave
    range: from 0 to 125
    slt_no
    Slot number
    range: from 0 to 127


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    5 : data refused
    err_dtno of ODBERR structure.
    1 : station number of slave is invalid
    2 : slot number is invalid
    5 : a kind of sub-function is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.

    profibus\pbm_ini_prm

    Initiaze the specified parameter of the PROFIBUS master function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_ini_prm( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specifies the kind of parameter to initiate.
    slvslt_ind structure is used according to the kind of parameter.

    0 : bus parameter for 9.6Kbps
    1 : bus parameter for 19.2Kbps
    2 : bus parameter for 93.75Kbps
    3 : bus parameter for 187.5Kbps
    4 : bus parameter for 500 Kbps
    6 : bus parameter for 1.5 Mbps
    7 : bus parameter for 3 Mbps
    8 : bus parameter for 6 Mbps
    9 : bus parameter for 12 Mbps
    260 : address allocation of mode
    270 : all slave parameter (slave sub-parameter + slave parameter + diagnosis data + DI/DO data)
    271 : slave parameter
    272 : diagnosis data
    999 : all parameter

    (note) about usage of slvslt_ind

    0 to 9 : slvslt_ind is not used
    260 : slvslt_ind is not used
    270 to 272 : only slvslt_ind.slv_no is used
    999 : slvslt_ind is not used

    slvslt_ind in

    Specifies the pointer to the T_SLVSLT_IND structure.
    The T_SLVSLT_IND structure is as follows. When the slave station is set to type, this structure is used.

    typedef struct _T_SLVSLT_IND{
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLVSLT_IND;
    
    
    slv_no
    Station number of slave
    range: from 0 to 125
    slt_no
    unused


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1 : station number of slave is invalid
    4 : a kind of parameter is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_PROT write protection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    11 : fail to write the parameter into SRAM
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_allslvtbl

    Reads all slave table


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_allslvtbl( unsigned short FlibHndl, OUT_ALLSLVTBL *all_slv_tbl );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    all_slv_tbl out

    Specifies the pointer to the OUT_ALLSLVTBL structure to store the acquired parameter.
    The OUT_ALLSLVTBL structure is as follows.

    typedef struct _OUT_ALLSLVTBL{
        T_SLVTBL    slv_tbl[80];
    } OUT_ALLSLVTBL;
    
    typedef struct _T_SLVTBL{
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       slv_enable;
        unsigned char       slt_num;
        unsigned char       dgn_path;
        unsigned char       dgn_kind;
        unsigned short      dgn_top_address;
        unsigned char       dgn_size;
        unsigned char       pad;
    } T_SLVTBL;
    
    /* SLAVE INDICATION PARAMETER */
    typedef struct _T_SLAVE_IND_PARA
    {
        unsigned char   slv_idx;
        unsigned char   slv_no;
    } T_SLAVE_IND_PARA;
    
    slv_tbl.slv_idx
    number of slave index
    ange: from 0 to 47
    slv_tbl.slv_no
    number of slave station
    range: from 0 to 125
    slv_tbl.slv_enable
    show whether the communication with the slave is valid or invalid
    0x00 invalid
    0xff valid
    slv_tbl.slt_num
    number of slot for I/O module
    range: from 1 to 128
    slv_tbl.dgn_path
    PMC path number of diagnosis data
    range: from 1 to 3
    slv_tbl.dgn_kind
    PMC address of diagnosis data
    range: R or E
    slv_tbl.dgn_top_address
    top number of PMC address of diagnosis data
    range: depend on the PMC address
    slv_tbl.dgn_size
    the size of diagnosis data
    range: from 0 to 244
    unit: byte
    slv_tbl.pad
    unused


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_cominfo

    Reads the communicating information


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_cominfo( unsigned short FlibHndl, short type, OUT_PBMCOMINFO *com_info );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    the kind of the reading information

    0 : current operation mode
    1 : current data refresh time
    com_info out

    Specifies the pointer to the OUT_PBMCOMINFO structure to store the acquired parameter.
    The OUT_PBMCOMINFO structure is as follows.

    typedef struct _OUT_PBMCOMINFO{
        union {
            unsigned char   crnt_mode;
            T_DATA_REF_TIM  data_ref_tim;
        } cominfo;
    } OUT_PBMCOMINFO;
    
    typedef struct _T_DATA_REF_TIM{
        unsigned short  total_ref_tim;
        unsigned short  board_ref_tim;
        unsigned short  cnc_ref_tim;
    } T_DATA_REF_TIM;
    
    crnt_mode
    current operation mode
    0 : "OFFLINE" mode
    64 : "STOP" mode
    128 : "CLEAR" mode
    192 : "OPERATE" mode
    data_ref_tim.total_ref_tim
    data refresh time( = board_ref_tim + cnc_ref_tim)
    range: 0 to 65535
    unit: milli-second
    data_ref_tim.board_ref_tim
    data refresh time in the PROFIBUS board
    range: 0 to 65535
    unit: milli-second
    data_ref_tim.cnc_ref_tim
    data refresh time in the CNC
    range: 0 to 65535
    unit: milli-second


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    8 : a kind of communicating information is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_errcode

    Reads an error code


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_errcode( unsigned short FlibHndl, T_ERR_CODE *err_code );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    err_code out

    Specifies the pointer to the T_ERR_CODE structure to store the acquired parameter.
    The T_ERR_CODE structure is as follows.

    typedef struct _T_ERR_CODE{
        unsigned short  param_err_code[4];
        unsigned short  inter_err_code[4];
    } T_ERR_CODE;
    
    param_err_code[0]
    0 : normal
    ("code2" is not used)
    1 : There is a slave that has illegal total of DI/DO size.
    When the total of DI/DO size in a certain slave exceeds 244 bytes.
    ("code2" indicates a corresponding slave. And if multiple slaves are corresponding slave, it indicates a slave of the smallest number.)
    2 : There is a slave that doesn't have slots.
    ("code2" indicates a corresponding slave. And if multiple slaves are corresponding slave, it indicates a slave of the smallest number.)
    3 : There is a slave that exceeds the permissible size of slave parameter.
    ("code2" indicates a corresponding slave. And if multiple slaves are corresponding slave, it indicates a slave of the smallest number.)
    4 : There is an invalid slot that has an invalid module data.
    (The upper byte of "code2" indicates a corresponding slave and the lower byte indicates a corresponding slot. And if multiple slots are corresponding slot, it indicates a slot of the smallest number.)
    5 : There is an invalid slot that exceeds the permissible total size (244bytes) of DI/DO data.
    ("code2" indicates a corresponding slave. And if multiple slaves are corresponding slave, it indicates a slave of the smallest number.)
    param_err_code[1]
    detail error code of param_err_code[0]
    param_err_code[2]
    unused
    param_err_code[3]
    unused
    inter_err_code[0]
    Error code 1 for maintenance
    inter_err_code[1]
    Error code 2 for maintenance
    inter_err_code[2]
    unused
    inter_err_code[3]
    unused


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_nodeinfo

    Reads the information of slave station


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_nodeinfo( unsigned short FlibHndl, short node, short number, OUT_PBMNODEINFO *node_info );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    node in

    The first slave number to want to get information

    number in

    Number of slaves in which you want to get information

    node_info out

    Specifies the pointer to the OUT_PBMNODEINFO structure to store the slave information.
    The OUT_PBMNODEINFO structure is as follows.
    It is necessary to allocate the size of structure specified by the above "number" beforehand.

    typedef struct _OUT_PBMNODEINFO{
        unsigned char   slv_no;
        unsigned char   commstat;
        unsigned char   status1;
        unsigned char   status2;
        unsigned char   status3;
        unsigned char   master;
        unsigned short  ident;
    } OUT_PBMNODEINFO;
    
    slv_no
    slave station (when commstat is equal to 0xff, this is master station)
    range: 0 to 125
    commstat
    the state of communication
    0x00 : invalid slave station
    0x01 : valid slave station (communicating)
    0x02 : valid slave station (disconnecting)
    0xff : master station (self-node)
    status1
    STATION STATUS1 of dignosis data
    status2
    STATION STATUS2 of dignosis data
    status3
    STATION STATUS3 of dignosis data
    master
    master station that sets parameter of slave station
    When the master station does not set the parameter, 255 is stored.
    ident
    identification number of slave station


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_nodetable

    Reads status of connected slave


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_nodetable( unsigned short FlibHndl, short node, char *table );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    node in

    slave number in which it wants to get state
    If you specify -1, you can get state of all slaves.

    table out

    Specifies the pointer of a valiable to store the acquired data.
    When you specify -1 to node, you must allocate 126 bytes or more.
    When you specify the slave station of 0 or more, the one byte data to specified slave station is returned.

    0x00 : invalid slave station
    0x01 : valid slave station (communicating)
    0x02 : valid slave station (disconnecting)
    0xff : master station (self-node)

    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_param

    Reads the parameters of the PROFIBUS master function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_param( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind, OUT_PBMPRM *param );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specifies the kind of PROFIBUS master parameter.
    The structure slvslt_ind is used according to the kind of the parameter.

    0 : Bus parameter
    1 : allocated PMC address of mode

    /* parameter for each slave station */

    20 : Slave sub parameter
    21 : Slave parameter
    22 : allocate of diagnosis data

    /* parameter for each slot module */

    40 : Module data
    41 : allocated PMC address of DI/DO data

    (note) about using slvslt_ind

    0 to 1 : slvslt_ind is not used.
    20 to 22 : slvslt_ind.slv_no is used.
    40 to 41 : slvslt_ind.slv_no and slvslt_ind.slt_no are used.

    slvslt_ind in

    Specifies the pointer to the T_SLVSLT_IND structure.
    The T_SLVSLT_IND structure is as follows. When the slave station or slot module is set to type, this structure is used.

    typedef struct _T_SLVSLT_IND{
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLVSLT_IND;
    
    slv_no
    Station number of slave. range: from 0 to 125
    range: from 0 to 125
    slt_no
    Slot number.
    range: from 0 to 127

    param out

    Specifies the pointer to the OUT_PBMPRM structure to store the acquired parameter. The OUT_PBMPRM structure is as follows.

    /*- parameter of master function -----------------------------------*/
    typedef struct _OUT_PBMPRM{
        union {
            T_BUS_PARA          bus_para;
            T_MODE_ADDR_ALLOC   mode_addr_alloc;
            T_SLAVE_SUB_PARA    slv_sub_para;
            T_SLAVE_PARA        slv_para;
            T_DGN_ADDR_ALLOC    dgn_addr_alloc;
            T_MODULE_DATA       module_data;
            T_DIDO_ADDR_ALLOC   dido_addr_alloc;
        } prm;
    } OUT_PBMPRM;
    
    /*- BUS PARAMETER -----------------------------------------*/
    typedef struct _T_BUS_PARA
    {
        unsigned char   fdl_add;                 /* station no. */
        unsigned char   baud_rate;
        unsigned short  tsl;
        unsigned short  min_tsdr;
        unsigned short  max_tsdr;
        unsigned char   tqui;
        unsigned char   tset;
        unsigned long   ttr;
        unsigned char   g;
        unsigned char   hsa;
        unsigned char   max_retry_limit;
        unsigned char   bp_flag;
        unsigned short  min_slave_interval;
        unsigned short  poll_timeout;
        unsigned short  data_control_time;
        unsigned char   reserved[6];
        char            master_class2_name[32];
        T_MAS_USR       mas_usr;
    } T_BUS_PARA;
    
    /* MASTER USER DATA */
    typedef struct _T_MAS_USR
    {
        unsigned short  master_user_data_len;
        unsigned char   master_user_data[62];
    } T_MAS_USR;
    
    /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
    typedef struct _T_MODE_ADDR_ALLOC
    {
        unsigned char       md_path;
        unsigned char       md_kind;
        unsigned short      md_top_address;
        unsigned char       md_size;
        unsigned char       pad;
    } T_MODE_ADDR_ALLOC;
    
    /*- SLAVE SUB-PARAMETER -----------------------------------*/
    typedef struct _T_SLAVE_SUB_PARA
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       slv_enable;
        unsigned char       slt_num;
    } T_SLAVE_SUB_PARA;
    
    /*- SLAVE PARAMETER -------------------------------------*/
    typedef struct _T_SLAVE_PARA
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       sl_flag;
        unsigned char       slave_type;
        unsigned char       reserved[12];
        T_PRM_DATA          prm_data;
        T_CFG_DATA          cfg_data;
        T_SLV_USR_DATA      slv_usr;
    } T_SLAVE_PARA;
    
    /* PARAMETER DATA */
    typedef struct _T_PRM_DATA
    {
        unsigned char   station_status;
        unsigned char   wd_fact_1;
        unsigned char   wd_fact_2;
        unsigned char   min_tsdr;
        unsigned short  ident_number;
        unsigned char   group_ident;
        unsigned char   pad;
        T_USR_PRM_DATA  usr_prm;
    } T_PRM_DATA;
    
    /* USER PARAMETER DATA */
    typedef struct _T_USR_PRM_DATA
    {
        unsigned short  user_prm_data_len;
        unsigned char   user_prm_data[201];
        unsigned char   pad;
    } T_USR_PRM_DATA;
    
    /* CONFIGURATION DATA */
    typedef struct _T_CFG_DATA
    {
        unsigned short  cfg_data_len;
        unsigned char   cfg_data[128];
    } T_CFG_DATA;
    
    /* SLAVE USER DATA */
    typedef struct _T_SLV_USR_DATA
    {
        unsigned short  slave_user_data_len;
        unsigned char   slave_user_data[30];
    } T_SLV_USR_DATA;
    
    /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
    typedef struct _T_DGN_ADDR_ALLOC
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       dgn_path;
        unsigned char       dgn_kind;
        unsigned short      dgn_top_address;
        unsigned char       dgn_size;
        unsigned char       pad;
    } T_DGN_ADDR_ALLOC;
    
    /*- MODULE DATA ---------------------------------------*/
    typedef struct _T_MODULE_DATA
    {
        T_SLOT_IND_PARA     slt_ind_para;
        unsigned short      module_len;
        unsigned char       module_data[128];
    } T_MODULE_DATA;
    
    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/
    typedef struct _T_DIDO_ADDR_ALLOC
    {
        T_SLOT_IND_PARA     slt_ind_para;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       module_type;
        unsigned char       pad;
    } T_DIDO_ADDR_ALLOC;
    
    /* SLAVE INDICATION PARAMETER */
    typedef struct _T_SLAVE_IND_PARA
    {
        unsigned char   slv_idx;
        unsigned char   slv_no;
    } T_SLAVE_IND_PARA;
    
    /* SLOT INDICATION PARAMETER */
    typedef struct _T_SLOT_IND_PARA
    {
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLOT_IND_PARA;
    

    /*- BUS PARAMETER -----------------------------------------*/

    prm.bus_para.fdl_add
    "FDL_Add" of PROFIBUS standards Station number of master(self-node)
    range: from 0 to 125
    prm.bus_para.baud_rate
    "Baud_rate" of PROFIBUS standards
    0 : 9.6 Kbps
    1 : 19.2 Kbps
    2 : 93.75 Kbps
    3 : 187.5 Kbps
    4 : 500.0 Kbps
    6 : 1.5 Mbps
    7 : 3.0 Mbps
    8 : 6.0 Mbps
    9 : 12.0 Mbps
    prm.bus_para.tsl
    "T SL" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.min_tsdr
    "min T SDR" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.max_tsdr
    "max T SDR" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.tqui
    "T QUI" of PROFIBUS standards
    range: from 0 to 255
    unit: bit time
    prm.bus_para.tset
    "T SET" of PROFIBUS standards
    range: from 1 to 255
    unit: bit time
    prm.bus_para.ttr
    "T TR" of PROFIBUS standards
    range: from 1 to 16777215
    unit: bit time
    prm.bus_para.g
    "G" of PROFIBUS standards
    range: from 1 to 100
    prm.bus_para.hsa
    "HSA" of PROFIBUS standards
    range: from 2 to 126
    prm.bus_para.max_retry_limit
    "max_retry_limit" of PROFIBUS standards
    ange: from 1 to 8
    prm.bus_para.bp_flag
    "Bp_Flag" of PROFIBUS standards
    bit7 : Error_Action_Flag
    bit6-0 : reserved
    prm.bus_para.min_slave_interval
    "Min_Slave_Interval" of PROFIBUS standards
    range: from 1 to 65535
    unit: 100 micro seconds
    prm.bus_para.poll_timeout
    "Poll_Timeout" of PROFIBUS standards
    range: from 1 to 65535
    unit: 1 milli-second
    prm.bus_para.data_control_time
    "Data_Control_Time" of PROFIBUS standards
    range: from 1 to 65535
    unit: 10 milli-seconds
    prm.bus_para.reserved[n](n : 0 to 6)
    reserved
    prm.bus_para.master_class2_name[n](n : 0 to 31)
    "Master_Class2_Name" of PROFIBUS standards
    ASCII string up to 32 bytes

    /* MASTER USER DATA */

    prm.bus_para.mas_usr.master_user_data_len
    the value decreasing -2 from "Master_User_Data_Len" of PROFIBUS standards
    range: from 0 to 62
    unit: byte
    prm.bus_para.mas_usr.master_user_data[n](n : 0 to 61)
    "Master_User_Data" of PROFIBUS standards

    /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/

    prm.mode_addr_alloc.md_path
    PMC path number
    range: from 1 to 3
    prm.mode_addr_alloc.md_kind
    PMC address
    range: R or E
    prm.mode_addr_alloc.md_top_address
    top number of PMC address
    range: depend on the PMC address
    prm.mode_addr_alloc.md_size
    unused
    prm.mode_addr_alloc.pad
    unused

    /*- SLAVE SUB-PARAMETER -----------------------------------*/

    prm.slv_sub_para.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.slv_sub_para.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.slv_sub_para.slv_enable
    show whether the communication with the slave is valid or invalid
    0x00 : invalid
    0xff : valid
    prm.slv_sub_para.slt_num
    number of slot for I/O module
    range: from 1 to 128

    /*- SLAVE PARAMETER -------------------------------------*/

    prm.slv_para.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.slv_para.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.slv_para.sl_flag
    "Sl_Flag" of PROFIBUS standards
    bit7 : Active
    bit6 : New_Prm
    bit5-0 : reserved
    prm.slv_para.slave_type
    "Slave_Type" of PROFIBUS standards
    range: from 0 to 255
    prm.slv_para.reserved[n](n : 0 to 11)
    reserved

    /* PARAMETER DATA */

    prm.slv_para.prm_data.station_status
    "Station_status" of PROFIBUS standards
    bit7 : Lock_Req
    bit6 : Unlock_Req
    bit5 : Sync_Req
    bit4 : Freeze_Req
    bit3 : WD_On
    bit2-0 : reserved
    prm.slv_para.prm_data.wd_fact_1
    "WD_Fact_1" of PROFIBUS standards
    range: from 1 to 255
    unit: milli-second
    prm.slv_para.prm_data.wd_fact_2
    "WD_Fact_2" of PROFIBUS standards
    range: from 1 to 255
    unit: milli-second
    prm.slv_para.prm_data.min_tsdr
    "min T SDR" of PROFIBUS standards
    range: from 0 to 255
    unit: bit time
    prm.slv_para.prm_data.ident_number
    "Ident_Number" of PROFIBUS standards
    prm.slv_para.prm_data.group_ident
    "Group_Ident" of PROFIBUS standards
    bit7 : Group8
    bit6 : Group7
    bit5 : Group6
    bit4 : Group5
    bit3 : Group4
    bit2 : Group3
    bit1 : Group2
    bit0 : Group1
    prm.slv_para.prm_data.pad
    unused

    /* USER PARAMETER DATA */

    prm.slv_para.prm_data.usr_prm.user_prm_data_len
    length of "User_Prm_Data" of PROFIBUS standards
    range: from 0 to 201
    unit: byte
    prm.slv_para.prm_data.usr_prm.user_prm_data[n](n : 0 to 200)
    "User_Prm_Data" of PROFIBUS standards
    prm.slv_para.prm_data.usr_prm.pad
    unused

    /* CONFIGURATION DATA */

    prm.slv_para.cfg_data.cfg_data_len
    the value decreasing -2 from "Cfg_Data_Len" of PROFIBUS standards
    range: from 0 to 128
    unit: byte
    prm.slv_para.cfg_data.cfg_data[n](n : 0 to 127)
    "Cfg_Data" of PROFIBUS standards

    /* SLAVE USER DATA */

    prm.slv_para.slv_usr.slave_user_data_len
    the value decreasing -2 from"Slave_User_Data_Len" of PROFIBUS standards
    range: from 0 to 30
    unit: byte
    prm.slv_para.slv_usr.slave_user_data[n](n : 0 to 29)
    "Slave_User_Data" of PROFIBUS standards

    /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/

    prm.dgn_addr_alloc.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.dgn_addr_alloc.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.dgn_addr_alloc.dgn_path
    PMC path number
    range: from 1 to 3
    prm.dgn_addr_alloc.dgn_kind
    PMC address
    range: R or E
    prm.dgn_addr_alloc.dgn_top_address
    top number of PMC address
    range: depend on the PMC address
    prm.dgn_addr_alloc.dgn_size
    the size of diagnosis data
    range: from 0 to 244
    unit: byte
    prm.dgn_addr_alloc.pad
    unused

    /*- MODULE DATA ---------------------------------------*/

    prm.module_data.slt_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.module_data.slt_ind_para.slt_no
    module number of slot
    range: from 0 to 127
    prm.module_data.module_len
    the length of "module" of PROFIBUS standards
    range: from 0 to 128
    unit: byte
    prm.module_data.module_data[n](n : 0 to 127)
    "module" of PROFIBUS standards

    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/

    prm.dido_addr_alloc.slt_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.dido_addr_alloc.slt_ind_para.slt_no
    module number of slot
    range: from 0 to 127
    prm.dido_addr_alloc.di_path
    PMC path number of DI data
    range: from 1 to 3
    prm.dido_addr_alloc.do_path
    PMC path number of DO data
    range: from 1 to 3
    prm.dido_addr_alloc.di_kind
    PMC address of DI data
    range: R or E
    prm.dido_addr_alloc.do_kind
    PMC address of DO data
    range: R or E
    prm.dido_addr_alloc.di_top_address
    top number of PMC address of DI data
    range: depend on the PMC address
    prm.dido_addr_alloc.do_top_address
    top number of PMC address of DO data
    range: depend on the PMC address
    prm.dido_addr_alloc.di_size
    the size of DI data
    range: from 0 to 244
    unit: byte
    prm.dido_addr_alloc.do_size
    the size of DO data
    range: from 0 to 244
    unit: byte
    prm.dido_addr_alloc.module_type
    type of module
    1 : INPUT only
    2 : OUTPUT only
    3 : INPUT and OUTPUT
    4 : no INPUT and no OUTPUT
    200 : out of size for INPUT/OUTPUT
    201 : violation of PROFIBUS standards
    255 : unsetting
    prm.dido_addr_alloc.pad
    unused


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    5 : data refused
    err_dtno of ODBERR structure.
    1 : station number of slave is invalid
    2 : slot number is invalid
    3 : a kind of parameter is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    err_dtno of ODBERR structure.
    なし
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_slot

    Reads the number of slot to which the DI/DO address of the master function is allocated regardless of Enable/Disable.
    Number of slot that can be read in this function keeps the value when the power is turned on.
    That is, it doesn't influence the return value of this function even if there is a change in slot information on the parameter setting screen.


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_slot( unsigned short FlibHndl, short *slot );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slot out

    Specifies the pointer of valiable to store the read information.


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1 : station number of slave is invalid
    9 : number of slave is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_slotinfo

    Reads the slot information to which the DI/DO address of the master function is allocated regardless of Enable/Disable.
    Slot information that can be read in this function keeps the value when the power is turned on.
    That is, it doesn't influence the return value of this function even if there is a change in slot information on the parameter setting screen.


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_slotinfo( unsigned short FlibHndl, short slot, short number, OUT_PBMSLOTINFO *slot_info );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slot in

    The first slot array number that you want to get information

    number in

    Number of slots that you want to get information

    slot_info out

    Specifies the pointer to the OUT_PBMSLOTINFO structure to store the DI/DO information.
    The OUT_PBMSLOTINFO structure is as follows.
    It is necessary to allocate the size of structure specified by the above "number" beforehand.

    typedef struct _OUT_PBMSLOTINFO{
        unsigned char   slv_no;
        unsigned char   slt_no;
        unsigned char   di_size;
        unsigned char   do_size;
        unsigned char   di_path;
        unsigned char   do_path;
        unsigned char   di_kind;
        unsigned char   do_kind;
        unsigned short  di_top_address;
        unsigned short  do_top_address;
        unsigned char   module_type;
        unsigned char   commstat;
        unsigned short  reserved;
    } OUT_PBMSLOTINFO;
    
    slv_no
    number of slave station
    0x00 to0x7d : valid slave station
    0xff : invalid slave station
    If a slave station is invalid, following information is invalid.
    slt_no
    module number of slot
    di_size
    the size of DI data
    do_size
    the size of DO data
    di_path
    PMC path number of DI data
    do_path
    PMC path number of DO data
    di_kind
    PMC address of DI data
    do_kind
    PMC address of DO data
    di_top_address
    top number of PMC address of DI data
    range: depend on the PMC address
    do_top_address
    top number of PMC address of DO data
    range: depend on the PMC address
    module_type
    type of module
    1 : INPUT only
    2 : OUTPUT only
    3 : INPUT and OUTPUT
    4 : no INPUT and no OUTPUT
    200 : out of size for INPUT/OUTPUT
    201 : violation of PROFIBUS standards
    255 : unsetting
    commstat
    the state of communication
    0x00 : invalid slave station
    0x01 : valid slave station (communicating)
    0x02 : valid slave station (disconnecting)
    reserved
    reserved


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_rd_subprm

    Reads the setting assistant parameters


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_rd_subprm( unsigned short FlibHndl, short type, T_SLVSLT_IND *slvslt_ind, OUT_PBMSUBPRM *sub_prm);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specifies the kind of the setting assistant parameter.
    slvslt_ind structure is used according to the kind of parameter.

    0 : number of maximum slave that can be set
    1 : number of maximum slot that can be set
    10 : number of maximum slave that can be communicated
    11 : total number of slot that has been set
    20 : state of SHIFT mode of module data length
    100 : number of maximum module length that can be set

    (note) about usage of slvslt_ind

    0 to 1 : slvslt_ind is not used
    10 to 11 : slvslt_ind is not used
    20 : slvslt_ind is not used
    100 : slvslt_ind.slv_no and slvslt_ind.slt_no are used

    slvslt_ind in

    Specifies the pointer to the T_SLVSLT_IND structure.
    The T_SLVSLT_IND structure is as follows. When the slave station or slot module is set to type, this structure is used.

    typedef struct _T_SLVSLT_IND{
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLVSLT_IND;
    
    slv_no
    Station number of slave
    range: from 0 to 125
    slt_no
    Slot number
    range: from 0 to 127

    sub_prm out

    Specifies the pointer to the OUT_PBMSUBPRM structure to store the acquired parameter.
    The OUT_PBMSUBPRM structure is as follows.

    typedef struct _OUT_PBMSUBPRM{
        union {
            unsigned char  max_slv_num;
            unsigned char  max_slt_num;
            unsigned char  enb_slv_num;
            unsigned char  total_slts;
            unsigned char  shift_mode_stat;
            T_MAXMODLENPRM max_mod_len_prm;
        } subprm;
    } OUT_PBMSUBPRM;
    
    typedef struct _T_MAXMODLENPRM{
        unsigned char   slv_no;
        unsigned char   slt_no;
        unsigned char   max_mod_len;
        unsigned char   pad;
    } T_MAXMODLENPRM;
    
    max_slv_num
    number of maximum slave that can be set
    range: 48
    max_slt_num
    number of maximum slot that can be set
    range: 128
    enb_slv_num
    number of slave that can be communicated
    range: 0 to 48
    total_slts
    number of slots to which setting is effective
    range: 0 to 128
    shift_mode_stat
    state of SHIFT mode of module data length
    0x00 : invalid
    0xff : valid
    max_mod_len_prm.slv_no
    number of slave station
    range: 0 to 125
    max_mod_len_prm.slt_no
    number of slot
    range: 0 to 127
    max_mod_len_prm.max_mod_len
    number of maximum module length that can be set
    range: 0 to 128
    unit: byte
    max_mod_len_prm.pad
    unused


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1 : station number of slave is invalid
    2 : slot number is invalid
    6 : a kind of the setting assistant parameter is invalid
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbm_wr_param

    Sets the parameter of the PROFIBUS master function.

    (note) It is necessary to set slv_ind_para and slt_ind_para specified in IN_PBMPRMFLG and IN_PBMPRM.


    PROTOTYPE

    FWLIBAPI short WINAPI pbm_wr_param(unsigned short FlibHndl, short type, IN_PBMPRMFLG *flag, IN_PBMPRM *param);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specifies the kind of PROFIBUS master parameter.

    0 : Bus parameter
    1 : allocated PMC address of mode

    /* parameter for each slave station */

    20 : Slave sub parameter
    21 : Slave parameter
    22 : allocate of diagnosis data
    23 : Slave sub-parameter and diagnosis data

    /* parameter for each slot module */

    40 : Module data
    41 : allocated PMC address of DI/DO data

    flag in

    Specifies the pointer to the IN_PBMPRMFLAG structure to indicate the item of the setting parameter.
    The IN_PBMPRMFLAG structure is as follows.

    /*- FLAG of MASTER FUNCTION ---------------------------------------*/
    typedef struct _IN_PBMPRMFLG {
        union {
            T_BUS_PARA_FLG              bus_para;
            T_MODE_ADDR_ALLOC_FLG       mode_addr_alloc;
            T_SLAVE_SUB_PARA_FLG        slv_sub_para;
            T_SLAVE_PARA_FLG            slv_para;
            T_DGN_ADDR_ALLOC_FLG        dgn_addr_alloc;
            T_MODULE_DATA_FLG           module_data;
            T_DIDO_ADDR_ALLOC_FLG       dido_addr_alloc;
        } flg;
    } IN_PBMPRMFLG;
    
    /*- BUS PARAMETER -----------------------------------------*/
    typedef struct _T_BUS_PARA_FLG {
        char    fdl_add;                         /* station no. */
        char    baud_rate;
        char    tsl;
        char    min_tsdr;
        char    max_tsdr;
        char    tqui;
        char    tset;
        char    ttr;
        char    g;
        char    hsa;
        char    max_retry_limit;
        char    bp_flag;
        char    min_slave_interval;
        char    poll_timeout;
        char    data_control_time;
        char    pad1;
        char    reserved[6];
        char    master_class2_name_rsv;
        char    pad2;
        T_MAS_USR_FLG   mas_usr;
    } T_BUS_PARA_FLG;
    
    /* MASTER USER DATA */
    typedef struct _T_MAS_USR_FLG
    {
        char    master_user_data_len;
        char    master_user_data;
    } T_MAS_USR_FLG;
    
    /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
    typedef struct _T_MODE_ADDR_ALLOC_FLG
    {
        char    md_path;
        char    md_kind;
        char    md_top_address;
        char    md_size;
    } T_MODE_ADDR_ALLOC_FLG;
    
    /*- SLAVE SUB-PARAMETER -----------------------------------*/
    typedef struct _T_SLAVE_SUB_PARA_FLG
    {
        T_SLAVE_IND_PARA_FLG    slv_ind_para;
        char                    slv_enable;
        char                    slt_num;
    } T_SLAVE_SUB_PARA_FLG;
    
    /*- SLAVE PARAMETER -------------------------------------*/
    typedef struct _T_SLAVE_PARA_FLG
    {
        T_SLAVE_IND_PARA_FLG    slv_ind_para;
        char                    sl_flag;
        char                    slave_type;
        char                    reserved[12];
        T_PRM_DATA_FLG          prm_data;
        T_CFG_DATA_FLG          cfg_data_rsv;
        T_SLV_USR_DATA_FLG      slv_usr;
    } T_SLAVE_PARA_FLG;
    
    /* PARAMETER DATA */
    typedef struct _T_PRM_DATA_FLG
    {
        char    station_status;
        char    wd_fact_1;
        char    wd_fact_2;
        char    min_tsdr;
        char    ident_number;
        char    group_ident;
        T_USR_PRM_DATA_FLG  usr_prm;
    } T_PRM_DATA_FLG;
    
    /* USER PARAMETER DATA */
    typedef struct _T_USR_PRM_DATA_FLG
    {
        char    user_prm_data_len;
        char    user_prm_data;
    } T_USR_PRM_DATA_FLG;
    
    /* CONFIGURATION DATA */
    typedef struct _T_CFG_DATA_FLG
    {
        char    cfg_data_len;
        char    cfg_data;
    } T_CFG_DATA_FLG;
    
    /* SLAVE USER DATA */
    typedef struct _T_SLV_USR_DATA_FLG
    {
        char    slave_user_data_len;
        char    slave_user_data;
    } T_SLV_USR_DATA_FLG;
    
    /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
    typedef struct _T_DGN_ADDR_ALLOC_FLG
    {
        T_SLAVE_IND_PARA_FLG    slv_ind_para;
        char                    dgn_path;
        char                    dgn_kind;
        char                    dgn_top_address;
        char                    dgn_size;
    } T_DGN_ADDR_ALLOC_FLG;
    
    /*- MODULE DATA ---------------------------------------*/
    typedef struct _T_MODULE_DATA_FLG
    {
        T_SLOT_IND_PARA_FLG     slt_ind_para;
        char                    module_len;
        char                    module_data;
    } T_MODULE_DATA_FLG;
    
    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/
    typedef struct _T_DIDO_ADDR_ALLOC_FLG
    {
        T_SLOT_IND_PARA_FLG     slt_ind_para;
        char                    di_path;
        char                    do_path;
        char                    di_kind;
        char                    do_kind;
        char                    di_top_address;
        char                    do_top_address;
        char                    di_size;
        char                    do_size;
        char                    module_type_rsv;
        char                    pad;
    } T_DIDO_ADDR_ALLOC_FLG;
    
    /* SLAVE INDICATION PARAMETER */
    typedef struct _T_SLAVE_IND_PARA_FLG
    {
        char   slv_idx;
        char   slv_no;
    } T_SLAVE_IND_PARA_FLG;
    
    /* SLOT INDICATION PARAMETER */
    typedef struct _T_SLOT_IND_PARA_FLG
    {
        char   slv_no;
        char   slt_no;
    } T_SLOT_IND_PARA_FLG;
    

    "1" is substituted for the set item. Even if the value is substituted for the IN_PBMPRM structure in case of "0", the paramter cannot be set.

    /*- BUS PARAMETER ----------------------------------------*/

    flg.bus_para.fdl_add
    flg.bus_para.baud_rate
    flg.bus_para.tsl
    flg.bus_para.min_tsdr
    flg.bus_para.max_tsdr
    flg.bus_para.tqui
    flg.bus_para.tset
    flg.bus_para.ttr
    flg.bus_para.g
    flg.bus_para.hsa
    flg.bus_para.max_retry_limit
    flg.bus_para.bp_flag
    flg.bus_para.min_slave_interval
    flg.bus_para.poll_timeout
    flg.bus_para.data_control_time
    flg.bus_para.pad1 -> unused
    flg.bus_para.reserved[n](n : 0 to 6) -> unused
    flg.bus_para.master_class2_name_rsv -> unused
    flg.bus_para.pad2 -> unused

    /* MASTER USER DATA */

    flg.bus_para.master_user_data_len
    flg.bus_para.master_user_data

    /*- ADDRESS ALLOCATION FOR MODE ------------------------------------*/

    flg.mode_addr_alloc.md_path
    flg.mode_addr_alloc.md_kind
    flg.mode_addr_alloc.md_top_address
    flg.mode_addr_alloc.md_size -> unused

    /*- SLAVE SUB-PARAMETER -----------------------------------*/

    flg.slv_sub_para.slv_ind_para.slv_idx
    flg.slv_sub_para.slv_ind_para.slv_no
    flg.slv_sub_para.slv_enable
    flg.slv_sub_para.slt_num

    /*- SLAVE PARAMETER -------------------------------------*/

    flg.slv_para.slave_ind_para.slv_idx
    flg.slv_para.slave_ind_para.slv_no
    flg.slv_para.sl_flag
    flg.slv_para.slave_type
    flg.slv_para.reserved[n](n : 0 to 11) -> unused

    /* PARAMETER DATA */

    flg.slv_para.prm_data.station_status
    flg.slv_para.prm_data.wd_fact_1
    flg.slv_para.prm_data.wd_fact_2
    flg.slv_para.prm_data.min_tsdr
    flg.slv_para.prm_data.ident_number
    flg.slv_para.prm_data.group_ident

    /* USER PARAMETER DATA */

    flg.slv_para.prm_data.user_prm_data_len
    flg.slv_para.prm_data.user_prm_data

    /* CONFIGURATION DATA */

    flg.slv_para.cfg_data_rsv.cfg_data_len -> unused
    flg.slv_para.cfg_data_rsv.cfg_data -> unused

    /* SLAVE USER DATA */

    flg.slv_para.user_data.slave_user_data_len
    flg.slv_para.user_data.slave_user_data

    /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/

    flg.dgn_addr_alloc.slave_ind_para.slv_idx
    flg.dgn_addr_alloc.slave_ind_para.slv_no
    flg.dgn_addr_alloc.dgn_path
    flg.dgn_addr_alloc.dgn_kind
    flg.dgn_addr_alloc.dgn_top_address
    flg.dgn_addr_alloc.dgn_size

    /*- MODULE DATA ---------------------------------------*/

    flg.module_data.slt_ind_para.slv_no
    flg.module_data.slt_ind_para.slt_no
    flg.module_data.module_len
    flg.module_data.module_data

    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/

    flg.dido_addr_alloc.slt_ind_para.slv_no
    flg.dido_addr_alloc.slt_ind_para.slt_no
    flg.dido_addr_alloc.di_path
    flg.dido_addr_alloc.do_path
    flg.dido_addr_alloc.di_kind
    flg.dido_addr_alloc.do_kind
    flg.dido_addr_alloc.di_top_address
    flg.dido_addr_alloc.do_top_address
    flg.dido_addr_alloc.di_size
    flg.dido_addr_alloc.do_size
    flg.dido_addr_alloc.module_type_rsv -> unused
    flg.dido_addr_alloc.pad -> unused

    param in

    Specifies the pointer to the IN_PBMPRM structure to store the setting parameter.
    The IN_PBMPRM structure is as follows.

    /*- parameter of master function -----------------------------------*/
    typedef struct _IN_PBMPRM{
        union {
            T_BUS_PARA          bus_para;
            T_MODE_ADDR_ALLOC   mode_addr_alloc;
            T_SLAVE_SUB_PARA    slv_sub_para;
            T_SLAVE_PARA        slv_para;
            T_DGN_ADDR_ALLOC    dgn_addr_alloc;
            T_MODULE_DATA       module_data;
            T_DIDO_ADDR_ALLOC   dido_addr_alloc;
        } prm;
    } IN_PBMPRM;
    
    /*- BUS PARAMETER -----------------------------------------*/
    typedef struct _T_BUS_PARA
    {
        unsigned char   fdl_add;                 /* station no. */
        unsigned char   baud_rate;
        unsigned short  tsl;
        unsigned short  min_tsdr;
        unsigned short  max_tsdr;
        unsigned char   tqui;
        unsigned char   tset;
        unsigned long   ttr;
        unsigned char   g;
        unsigned char   hsa;
        unsigned char   max_retry_limit;
        unsigned char   bp_flag;
        unsigned short  min_slave_interval;
        unsigned short  poll_timeout;
        unsigned short  data_control_time;
        unsigned char   reserved[6];
        char            master_class2_name[32];
        T_MAS_USR       mas_usr;
    } T_BUS_PARA;
    
    /* MASTER USER DATA */
    typedef struct _T_MAS_USR
    {
        unsigned short  master_user_data_len;
        unsigned char   master_user_data[62];
    } T_MAS_USR;
    
    /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
    typedef struct _T_MODE_ADDR_ALLOC
    {
        unsigned char       md_path;
        unsigned char       md_kind;
        unsigned short      md_top_address;
        unsigned char       md_size;
        unsigned char       pad;
    } T_MODE_ADDR_ALLOC;
    
    /*- SLAVE SUB-PARAMETER -----------------------------------*/
    typedef struct _T_SLAVE_SUB_PARA
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       slv_enable;
        unsigned char       slt_num;
    } T_SLAVE_SUB_PARA;
    
    /*- SLAVE PARAMETER ----------------------------------------*/
    typedef struct _T_SLAVE_PARA
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       sl_flag;
        unsigned char       slave_type;
        unsigned char       reserved[12];
        T_PRM_DATA          prm_data;
        T_CFG_DATA          cfg_data;
        T_SLV_USR_DATA      slv_usr;
    } T_SLAVE_PARA;
    
    /* PARAMETER DATA */
    typedef struct _T_PRM_DATA
    {
        unsigned char   station_status;
        unsigned char   wd_fact_1;
        unsigned char   wd_fact_2;
        unsigned char   min_tsdr;
        unsigned short  ident_number;
        unsigned char   group_ident;
        unsigned char   pad;
        T_USR_PRM_DATA  usr_prm;
    } T_PRM_DATA;
    
    /* USER PARAMETER DATA */
    typedef struct _T_USR_PRM_DATA
    {
        unsigned short  user_prm_data_len;
        unsigned char   user_prm_data[201];
        unsigned char   pad;
    } T_USR_PRM_DATA;
    
    /* CONFIGURATION DATA */
    typedef struct _T_CFG_DATA
    {
        unsigned short  cfg_data_len;
        unsigned char   cfg_data[128];
    } T_CFG_DATA;
    
    /* SLAVE USER DATA */
    typedef struct _T_SLV_USR_DATA
    {
        unsigned short  slave_user_data_len;
        unsigned char   slave_user_data[30];
    } T_SLV_USR_DATA;
    
    /*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
    typedef struct _T_DGN_ADDR_ALLOC
    {
        T_SLAVE_IND_PARA    slv_ind_para;
        unsigned char       dgn_path;
        unsigned char       dgn_kind;
        unsigned short      dgn_top_address;
        unsigned char       dgn_size;
        unsigned char       pad;
    } T_DGN_ADDR_ALLOC;
    
    /*- MODULE DATA ---------------------------------------*/
    typedef struct _T_MODULE_DATA
    {
        T_SLOT_IND_PARA     slt_ind_para;
        unsigned short      module_len;
        unsigned char       module_data[128];
    } T_MODULE_DATA;
    
    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/
    typedef struct _T_DIDO_ADDR_ALLOC
    {
        T_SLOT_IND_PARA     slt_ind_para;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       module_type;
        unsigned char       pad;
    } T_DIDO_ADDR_ALLOC;
    
    /* SLAVE INDICATION PARAMETER */
    typedef struct _T_SLAVE_IND_PARA
    {
        unsigned char   slv_idx;
        unsigned char   slv_no;
    } T_SLAVE_IND_PARA;
    
    /* SLOT INDICATION PARAMETER */
    typedef struct _T_SLOT_IND_PARA
    {
        unsigned char   slv_no;
        unsigned char   slt_no;
    } T_SLOT_IND_PARA;
    

    /*- BUS PARAMETER -----------------------------------------*/

    prm.bus_para.fdl_add
    "FDL_Add" of PROFIBUS standards Station number of master(self-node)
    range: from 0 to 125
    prm.bus_para.baud_rate
    "Baud_rate" of PROFIBUS standards
    0 : 9.6 Kbps
    1 : 19.2 Kbps
    2 : 93.75 Kbps
    3 : 187.5 Kbps
    4 : 500.0 Kbps
    6 : 1.5 Mbps
    7 : 3.0 Mbps
    8 : 6.0 Mbps
    9 : 12.0 Mbps
    prm.bus_para.tsl
    "T SL" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.min_tsdr
    "min T SDR" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.max_tsdr
    "max T SDR" of PROFIBUS standards
    range: from 1 to 65535
    unit: bit time
    prm.bus_para.tqui
    "T QUI" of PROFIBUS standards
    range: from 0 to 255
    unit: bit time
    prm.bus_para.tset
    "T SET" of PROFIBUS standards
    range: from 1 to 255
    unit: bit time
    prm.bus_para.ttr
    "T TR" of PROFIBUS standards
    range: from 1 to 16777215
    unit: bit time
    prm.bus_para.g
    "G" of PROFIBUS standards
    range: from 1 to 100
    prm.bus_para.hsa
    "HSA" of PROFIBUS standards
    range: from 2 to 126
    prm.bus_para.max_retry_limit
    "max_retry_limit" of PROFIBUS standards
    range: from 1 to 8
    prm.bus_para.bp_flag
    "Bp_Flag" of PROFIBUS standards
    bit7 : Error_Action_Flag
    bit6-0 : reserved
    prm.bus_para.min_slave_interval
    "Min_Slave_Interval" of PROFIBUS standards
    range: from 1 to 65535
    unit: 100 micro seconds
    prm.bus_para.poll_timeout
    "Poll_Timeout" of PROFIBUS standards
    range: from 1 to 65535
    unit: 1 milli-second
    prm.bus_para.data_control_time
    "Data_Control_Time" of PROFIBUS standards
    range: from 1 to 65535
    unit: 10 milli-seconds
    prm.bus_para.reserved[n](n : 0 to 6)
    reserved
    prm.bus_para.master_class2_name[n](n : 0 to 31)
    reserved

    /* MASTER USER DATA */

    prm.bus_para.mas_usr.master_user_data_len
    "Master_User_Data_Len" of PROFIBUS standards
    range: from 0 to 62
    unit: byte
    prm.bus_para.mas_usr.master_user_data[n](n : 0 to 61)
    "Master_User_Data" of PROFIBUS standards

    /*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/

    prm.mode_addr_alloc.md_path
    PMC path number
    range: from 1 to 3
    prm.mode_addr_alloc.md_kind
    PMC address
    range: R or E
    prm.mode_addr_alloc.md_top_address
    top number of PMC address
    range: depend on the PMC address
    prm.mode_addr_alloc.md_size
    unused
    prm.mode_addr_alloc.pad
    unused

    /*- SLAVE SUB-PARAMETER -----------------------------------*/

    prm.slv_sub_para.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.slv_sub_para.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.slv_sub_para.slv_enable
    show whether the communication with the slave is valid or invalid
    0x00 : invalid
    0xff : valid
    prm.slv_sub_para.slt_num
    number of slot for I/O module
    range: from 1 to 128

    /*- SLAVE PARAMETER -------------------------------------*/

    prm.slv_para.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.slv_para.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.slv_para.sl_flag
    "Sl_Flag" of PROFIBUS standards
    bit7 : Active
    bit6 : New_Prm
    bit5-0 : reserved
    prm.slv_para.slave_type
    "Slave_Type" of PROFIBUS standards
    range: from 0 to 255
    prm.slv_para.reserved[n](n : 0 to 11)
    reserved

    /* PARAMETER DATA */

    prm.slv_para.prm_data.station_status
    "Station_status" of PROFIBUS standards
    bit7 : Lock_Req
    bit6 : Unlock_Req
    bit5 : Sync_Req
    bit4 : Freeze_Req
    bit3 : WD_On
    bit2-0 : reserved
    prm.slv_para.prm_data.wd_fact_1
    "WD_Fact_1" of PROFIBUS standards
    range: from 1 to 255
    unit: milli-second
    prm.slv_para.prm_data.wd_fact_2
    "WD_Fact_2" of PROFIBUS standards
    range: from 1 to 255
    unit: milli-second
    prm.slv_para.prm_data.min_tsdr
    "min T SDR" of PROFIBUS standards
    range: from 0 to 255
    unit: bit time
    prm.slv_para.prm_data.ident_number
    "Ident_Number" of PROFIBUS standards
    prm.slv_para.prm_data.group_ident
    "Group_Ident" of PROFIBUS standards
    bit7 : Group8
    bit6 : Group7
    bit5 : Group6
    bit4 : Group5
    bit3 : Group4
    bit2 : Group3
    bit1 : Group2
    bit0 : Group1
    prm.slv_para.prm_data.pad
    unused

    /* USER PARAMETER DATA */

    prm.slv_para.prm_data.usr_prm.user_prm_data_len
    length of "User_Prm_Data" of PROFIBUS standards
    range: from 0 to 201
    unit: byte
    prm.slv_para.prm_data.usr_prm.user_prm_data[n](n : 0 to 200)
    "User_Prm_Data" of PROFIBUS standards
    prm.slv_para.prm_data.usr_prm.pad
    unused

    /* CONFIGURATION DATA */

    prm.slv_para.cfg_data.cfg_data_len
    unused
    prm.slv_para.cfg_data.cfg_data[n](n : 0 to 127)
    unused

    /* SLAVE USER DATA */

    prm.slv_para.slv_usr.slave_user_data_len
    the value decreasing -2 from"Slave_User_Data_Len" of PROFIBUS standards
    range: from 0 to 30
    unit: byte
    prm.slv_para.slv_usr.slave_user_data[n](n : 0 to 29)
    "Slave_User_Data" of PROFIBUS standards

    /*- ALLOCATION OF DIAGNOSIS DATA --------------------------------------*/

    prm.dgn_addr_alloc.slv_ind_para.slv_idx
    number of slave index
    range: from 0 to 47
    prm.dgn_addr_alloc.slv_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.dgn_addr_alloc.dgn_path
    PMC path number
    range: from 1 to 3
    prm.dgn_addr_alloc.dgn_kind
    PMC address
    range: R or E
    prm.dgn_addr_alloc.dgn_top_address
    top number of PMC address
    range: depend on the PMC address
    prm.dgn_addr_alloc.dgn_size
    the size of diagnosis data
    range: from 0 to 244
    unit: byte
    prm.dgn_addr_alloc.pad
    unused

    /*- MODULE DATA ---------------------------------------*/

    prm.module_data.slt_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.module_data.slt_ind_para.slt_no
    module number of slot
    range: from 0 to 127
    prm.module_data.module_len
    the length of "module" of PROFIBUS standards
    range: from 0 to 128
    unit: byte
    prm.module_data.module_data[n](n : 0 to 127)
    "module" of PROFIBUS standards

    /*- ALLOCATION OF DI/DO DATA --------------------------------------*/

    prm.dido_addr_alloc.slt_ind_para.slv_no
    number of slave station
    range: from 0 to 125
    prm.dido_addr_alloc.slt_ind_para.slt_no
    module number of slot
    range: from 0 to 127
    prm.dido_addr_alloc.di_path
    PMC path number of DI data
    range: from 1 to 3
    prm.dido_addr_alloc.do_path
    PMC path number of DO data
    range: from 1 to 3
    prm.dido_addr_alloc.di_kind
    PMC address of DI data
    range: R or E
    prm.dido_addr_alloc.do_kind
    PMC address of DO data
    range: R or E
    prm.dido_addr_alloc.di_top_address
    top number of PMC address of DI data
    range: depend on the PMC address
    prm.dido_addr_alloc.do_top_address
    top number of PMC address of DO data
    range: depend on the PMC address
    prm.dido_addr_alloc.di_size
    the size of DI data
    range: from 0 to 244
    unit: byte
    prm.dido_addr_alloc.do_size
    the size of DO data
    range: from 0 to 244
    unit: byte
    prm.dido_addr_alloc.module_type
    unused
    prm.dido_addr_alloc.pad
    unused


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    1 : invalid character
    2 : out of range
    3 : format error
    4 : out of digit
    5 : data refused
    err_dtno of ODBERR structure.
    3 : a kind of parameter is invalid

    /*- BUS PARAMETER -------------------------*/

    100 : prm.bus_para.fdl_add
    101 : prm.bus_para.baud_rate
    102 : prm.bus_para.tsl
    103 : prm.bus_para.min_tsdr
    104 : prm.bus_para.max_tsdr
    105 : prm.bus_para.tqui
    106 : prm.bus_para.tset
    107 : prm.bus_para.ttr
    108 : prm.bus_para.g
    109 : prm.bus_para.hsa
    110 : prm.bus_para.max_retry_limit
    111 : prm.bus_para.bp_flag
    112 : prm.bus_para.min_slave_interval
    113 : prm.bus_para.poll_timeout
    114 : prm.bus_para.data_control_time
    115 : pad1 -> unused
    116 to 121 : prm.bus_para.reserved[n](n : 0 to 5) -> unused
    122 : prm.bus_para.master_class2_name
    123 : pad2 -> unused

    /* MASTER USER DATA */

    130 : prm.bus_para.master_user_data_len
    131 : prm.bus_para.master_user_data

    /*- ADDRESS ALLOCATION FOR MODE -------------------*/

    140 : prm.mode_addr_alloc.md_path
    141 : prm.mode_addr_alloc.md_kind
    142 : prm.mode_addr_alloc.md_top_address
    143 : prm.mode_addr_alloc.md_size
    144 : prm.mode_addr_alloc.pad -> unused

    /*- SLAVE SUB-PARAMETER -------------------*/

    150 : prm.slv_sub_para.slv_ind_para.slv_idx
    151 : prm.slv_sub_para.slv_ind_para.slv_no
    152 : prm.slv_sub_para.slv_enable
    153 : prm.slv_sub_para.slt_num

    /*- SLAVE PARAMETER ---------------------*/

    160 : prm.slv_para.slv_ind_para.slv_idx
    161 : prm.slv_para.slv_ind_para.slv_no
    162 : prm.slv_para.sl_flag
    163 : prm.slv_para.slave_type
    164 to 175 : prm.slv_para.reserved[n](n : 0 to 11) -> unused

    /* PARAMETER DATA */

    180 : prm.slv_para.prm_data.station_status
    181 : prm.slv_para.prm_data.wd_fact_1
    182 : prm.slv_para.prm_data.wd_fact_2
    183 : prm.slv_para.prm_data.min_tsdr
    184 : prm.slv_para.prm_data.ident_number
    185 : prm.slv_para.prm_data.group_ident
    186 : prm.slv_para.prm_data.pad -> unused

    /* USER PARAMETER DATA */

    190 : prm.slv_para.prm_data.user_prm_data_len
    191 : prm.slv_para.prm_data.user_prm_data

    /* CONFIGURATION DATA */

    200 : prm.slv_para.cfg_data.cfg_data_len -> unused
    201 : prm.slv_para.cfg_data.cfg_data -> unused

    /* SLAVE USER DATA */

    210 : prm.slv_para.user_data.slave_user_data_len
    211 : prm.slv_para.user_data.slave_user_data

    /*- ALLOCATION OF DIAGNOSIS DATA -----------------------*/

    220 : prm.dgn_addr_alloc.slv_ind_para.slv_idx
    221 : prm.dgn_addr_alloc.slv_ind_para.slv_no
    222 : prm.dgn_addr_alloc.dgn_path
    223 : prm.dgn_addr_alloc.dgn_kind
    224 : prm.dgn_addr_alloc.dgn_top_address
    225 : prm.dgn_addr_alloc.dgn_size
    226 : prm.dgn_addr_alloc.pad -> unused

    /*- MODULE DATA -----------------------*/

    230 : prm.module_data.slt_ind_para.slv_no
    231 : prm.module_data.slt_ind_para.slt_no
    232 : prm.module_data.module_len
    233 : prm.module_data.module_data

    /*- ALLOCATION OF DI/DO DATA ----------------------*/

    240 : prm.dido_addr_alloc.slt_ind_para.slv_no
    241 : prm.dido_addr_alloc.slt_ind_para.slt_no
    242 : prm.dido_addr_alloc.di_path
    243 : prm.dido_addr_alloc.do_path
    244 : prm.dido_addr_alloc.di_kind
    245 : prm.dido_addr_alloc.do_kind
    246 : prm.dido_addr_alloc.di_top_address
    247 : prm.dido_addr_alloc.do_top_address
    248 : prm.dido_addr_alloc.di_size
    249 : prm.dido_addr_alloc.do_size
    250 : prm.dido_addr_alloc.module_type -> unused
    251 : prm.dido_addr_alloc.pad -> unused
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    40 : There is no PROFIBUS master board.
    41 : There is no PROFIBUS master function.
    42 : There is no SRAM of PROFIBUS master function.
    EW_PROT write protection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    11 : fail to write the parameter into SRAM
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_ini_prm

    Initializes the parameters of the PROFIBUS slave function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_ini_prm(unsigned short FlibHndl, short type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specifies the kind of parameterto initiate.

    999 : initialization of all PROFIBUS slave parameter


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1001 : type
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_PROT write protection
    Write operation is prohibited.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    11 : fail to write the parameter into SRAM
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_rd_cominfo

    Reads the communication state of the PROFIBUS slave function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_rd_cominfo( unsigned short FlibHndl, OUT_PBSSTATUS *status );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    status out

    Specifies the pointer to the OUT_PBSSTATUS structure to store the communication status.
    The OUT_PBSSTATUS structure is as follows.

    typedef struct OUT_PBSSTATUS{
        unsigned char   config_sts;
        unsigned char   param_sts;
        unsigned char   watchdog_sts;
        unsigned char   pad;
        unsigned short  ident_no;
    } OUT_PBSSTATUS;
    
    config_sts
    The status of configuration data is indicated.
    FF : Initial state
    00 : Configuration data is valid.
    F0 : A slave parameter(parameter data or configuration data) is invalid.
    01 : The length of configuration data is invalid.
    02 : Configuration data included errors.
    param_sts
    The status of parameter data is indicated.
    FF : Initial state
    00 : Parameter data is valid.
    F0 : A slave parameter(parameter data or configuration data) is invalid.
    watchdog_sts
    The status of the communication link with the master station is indicated.
    FF : Initial state
    00 : Communication being performed normally
    01 : Disconnected
    pad
    unused
    ident_no
    Identification number of a CNC slave station manufactured by FANUC


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.

    profibus\pbs_rd_cominfo2

    Reads the communication state of the PROFIBUS slave function.
    The status data is added to pbs_rd_cominfo function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_rd_cominfo2( unsigned short FlibHndl, OUT_PBSSTATUS2 *status2 );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    status2 out

    Specifies the pointer to the OUT_PBSSTATUS2 structure to store the communication status.
    The OUT_PBSSTATUS2 structure is as follows.

    typedef struct OUT_PBSSTATUS2{
        unsigned char   config_sts;
        unsigned char   param_sts;
        unsigned char   watchdog_sts;
        unsigned char   pad1;
        unsigned short  ident_no;
        unsigned char   sts;
        unsigned char   pad2;
    } OUT_PBSSTATUS2;
    
    config_sts
    The status of configuration data is indicated.
    FF : Initial state
    00 : Configuration data is valid.
    F0 : A slave parameter(parameter data or configuration data) is invalid.
    01 : The length of configuration data is invalid.
    02 : Configuration data included errors.
    param_sts
    The status of parameter data is indicated.
    FF : Initial state
    00 : Parameter data is valid.
    F0 : A slave parameter(parameter data or configuration data) is invalid.
    watchdog_sts
    The status of the communication link with the master station is indicated.
    FF : Initial state
    00 : Communication being performed normally
    01 : Disconnected
    pad1
    unused
    ident_no
    Identification number of a CNC slave station manufactured by FANUC
    sts
    he status that is indicated to PMC area
    range: from 0x00 to 0xFF
    pad2
    unused


    ERRORS

    Code Description
    EW_VERSION Version mismatch between the CNC/PMC and library
    Please use pbs_rd_cominfo function.
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_rd_param

    Reads the parameters of the PROFIBUS slave function.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_rd_param( unsigned short FlibHndl, OUT_PBSPRM *param ) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    param out

    Specifies the pointer to the OUT_PBSPRM structure to store the the acquired parameter.
    The OUT_PBSPRM structure is as follows.

    typedef struct _OUT_PBSPRM{
        unsigned char       slave_no;
        unsigned char       pad;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
    } OUT_PBSPRM;
    
    slave_no
    Station number of slave
    range: from 0 to 125
    pad
    unused
    di_size
    size of DI data
    range: from 0 to 244
    unit: byte
    do_size
    size of DO data
    range: from 0 to 244
    unit: byte
    di_path
    PMC path number of DI data
    range: from 1 to 3
    do_path
    DPMC path number of DO data
    range: from 1 to 3
    di_kind
    PMC address of DI data
    range: R or E
    do_kind
    PMC address of DO data
    range: R or E
    di_top_address
    top number of PMC address for DI data
    range: depends on the PMC address
    do_top_address
    top number of PMC address for DO data
    range: depends on the PMC address


    ERRORS

    Code Description
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_rd_param2

    Reads the parameter of the PROFIBUS slave function.
    The status data is added to pbs_rd_param


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_rd_param2(unsigned short FlibHndl, OUT_PBSPRM2 *param2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    param2 out

    Specifies the pointer to the OUT_PBSPRM2 structure to store the the acquired parameter.
    The OUT_PBSPRM2 structure is as follows.

    typedef struct _OUT_PBSPRM2{
        unsigned char       slave_no;
        unsigned char       pad;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
        unsigned char       sts_path;
        unsigned char       sts_kind;
        unsigned short      sts_top_address;
    } OUT_PBSPRM2;
    
    slave_no
    Station number of slave
    range: from 0 to 125
    pad
    unused
    di_size
    size of DI data
    range: from 0 to 244
    unit: byte
    do_size
    size of DO data
    range: from 0 to 244
    unit: byte
    di_path
    PMC path number of DI data
    range: from 1 to 3
    do_path
    PMC path number of DO data
    range: from 1 to 3
    di_kind
    PMC address of DI data
    range: R or E
    do_kind
    PMC address of DO data
    range: R or E
    di_top_address
    top number of PMC address for DI data
    range: depends on the PMC address
    do_top_address
    top number of PMC address for DO data
    range: depends on the PMC address
    sts_path
    PMC path number of status data
    range: from 1 to 3
    sts_kind
    PMC address of status data
    range: R, E or Z
    sts_top_address
    top number of PMC address for status data
    range: depends on the PMC address


    ERRORS

    Code Description
    EW_VERSION Version mismatch between the CNC/PMC and library
    Version mismatch between the CNC/PMC and library Please use pbs_rd_param function.
    In this case, PMC address of status data is the followings.
    - sts_path = 1
    - sts_kind ='R'
    - sts_address = 9094
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_wr_param

    Sets the parameter of the PROFIBUS slave function.
    (note) It is necessary to set slave_no specified in IN_PBSPRMFLG and IN_PBSPRM.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_wr_param( unsigned short FlibHndl, IN_PBSPRMFLG *flag, IN_PBSPRM *param );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    flag in

    Specifies the pointer to the IN_PBSPRMFLG structure to indicate the item of the setting parameter.
    The IN_PBSPRMFLG structure is as follows.

    typedef struct _IN_PBSPRMFLG {
        char        slave_no;
        char        pad;
        char        di_size;
        char        do_size;
        char        di_path;
        char        do_path;
        char        di_kind;
        char        do_kind;
        char        di_top_address;
        char        do_top_address;
    } IN_PBSPRMFLG;
    
    "1" is substituted for the set item. Even if the value is substituted for the IN_PBSPRM structure in case of "0", the paramter cannot be set.

    param in

    Specifies the pointer to the IN_PBSPRM structure to store the the setting parameter.
    The IN_PBSPRM structure is as follows.

    typedef struct _IN_PBSPRM{
        unsigned char       slave_no;
        unsigned char       pad;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
    } IN_PBSPRM;
    
    slave_no
    Station number of slave
    range: from 0 to 125
    pad
    unused
    di_size
    size of DI data
    range: from 0 to 244
    unit: byte
    do_size
    size of DO data
    range: from 0 to 244
    unit: byte
    di_path
    PMC path number of DI data
    range: from 1 to 3
    do_path
    PMC path number of DO data
    range: from 1 to 3
    di_kind
    PMC address of DI data
    range: R or E
    do_kind
    PMC address of DO data
    range: R or E
    di_top_address
    top number of PMC address for DI data
    range: depends on the PMC address
    do_top_address
    top number of PMC address for DO data
    range: depends on the PMC address


    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1100 : slave_no
    1101 : di_path
    1102 : do_path
    1103 : di_kind
    1104 : do_kind
    1105 : di_top_address
    1106 : do_top_address
    1107 : di_size
    1108 : do_size
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_PROT write protection
    Write operation is prohibited.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    11 : fail to write the parameter into SRAM
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pbs_wr_param2

    Sets the parameter of the PROFIBUS slave function.
    The status data is added to pbs_wr_param function.
    (note) It is necessary to set slave_no specified in IN_PBSPRMFLG2 and IN_PBSPRM2.


    PROTOTYPE

    FWLIBAPI short WINAPI pbs_wr_param2( unsigned short FlibHndl, IN_PBSPRMFLG2 *flag2, IN_PBSPRM2 *param2 );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    flag2 in

    Specifies the pointer to the IN_PBSPRMFLG2 structure to indicate the item of the setting parameter.
    The IN_PBSPRMFLG2 structure is as follows.

    typedef struct _IN_PBSPRMFLG2 {
        char        slave_no;
        char        pad1;
        char        di_size;
        char        do_size;
        char        di_path;
        char        do_path;
        char        di_kind;
        char        do_kind;
        char        di_top_address;
        char        do_top_address;
        char        sts_path;
        char        sts_kind;
        char        sts_top_address;
        char        pad2;
    } IN_PBSPRMFLG2;
    
    "1" is substituted for the set item. Even if the value is substituted for the IN_PBSPRM2 structure in case of "0", the paramter cannot be set.

    param2 in

    Specifies the pointer to the IN_PBSPRM2 structure to store the the setting parameter.
    The IN_PBSPRM2 structure is as follows.

    typedef struct _IN_PBSPRM2{
        unsigned char       slave_no;
        unsigned char       pad;
        unsigned char       di_size;
        unsigned char       do_size;
        unsigned char       di_path;
        unsigned char       do_path;
        unsigned char       di_kind;
        unsigned char       do_kind;
        unsigned short      di_top_address;
        unsigned short      do_top_address;
        unsigned char       sts_path;
        unsigned char       sts_kind;
        unsigned short      sts_top_address;
    } IN_PBSPRM2;
    
    slave_no
    Station number of slave
    range: from 0 to 125
    pad
    unused
    di_size
    size of DI data
    range: from 0 to 244
    unit: byte
    do_size
    size of DO data
    range: from 0 to 244
    unit: byte
    di_path
    PMC path number of DI data
    range: from 1 to 3
    do_path
    PMC path number of DO data
    range: from 1 to 3
    di_kind
    PMC address of DI data
    range: R or E
    do_kind
    PMC address of DO data
    range: R or E
    di_top_address
    top number of PMC address for DI data
    range: depends on the PMC address
    do_top_address
    top number of PMC address for DO data
    range: depends on the PMC address
    sts_path
    PMC path number of status data
    range: from 1 to 3
    sts_kind
    PMC address of status data
    range: R,E or Z
    sts_top_address
    top number of PMC address for status data
    range: depends on the PMC address


    ERRORS

    Code Description
    EW_VERSION Version mismatch between the CNC/PMC and library
    Please use pbs_wr_param function.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    2 : out of range
    err_dtno of ODBERR structure.
    1100 slave_no
    1101 di_path
    1102 do_path
    1103 di_kind
    1104 do_kind
    1105 di_top_address
    1106 do_top_address
    1107 di_size
    1108 do_size
    1109 sts_path
    1110 sts_kind
    1111 sts_top_address
    EW_NOOPT No option
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    43 : There is no PROFIBUS slave board.
    44 : There is no PROFIBUS slave function.
    45 : There is no SRAM of PROFIBUS slave function.
    EW_PROT write protection
    Write operation is prohibited.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    11 : fail to write the parameter into SRAM
    EW_REJECT CNC execution rejection
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    err_no of ODBERR structure.
    10 : fail to read the parameter from SRAM

    profibus\pmc_prfrdallcadr

    Reads the address allocation of the specified slave number.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    This function is unavailable at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdallcadr(unsigned short FlibHndl, short slave_no, IODBPRFADR *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slave_no in

    Specify the slave number to read.

    odb out

    Pointer to the IODBPRFADR structure including the address allocation. The IODBPRFADR structure is as follows.

    typedef struct {
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        short          reserve1;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        short          reserve2;
        unsigned char  dgn_size;
        char           dgn_type;
        unsigned short dgn_addr;
    } IODBPRFADR ;
    
    di_size
    The size of area used as buffer of DI data is stored.
    di_type
    The kind of the PMC address used as a buffer of the DI data is stored with ASCII CODE.
    di_addr
    The top number of the PMC address used as a buffer of the DI data is stored.
    reserve1
    not used
    do_size
    The size of area used as buffer of DO data is stored.
    do_type
    The kind of the PMC address used as a buffer of the DO data is stored with ASCII CODE.
    do_addr
    The top number of the PMC address used as a buffer of the DO data is stored.
    reserve2
    not used
    dgn_size
    The size of the area where the diagnosis data is read is stored.
    dgn_type
    The kind of the PMC address used as an area where the diagnosis data is read is stored with ASCII CODE.
    dgn_addr
    The top number of the PMC address used as an area where the diagnosis data is read is stored.


    ERRORS

    Code Description
    EW_RANGE data number error
    Slave number(slave_no) is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfrdbusprm

    Reads the bus parameter of master function.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    This function is also available at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdbusprm(unsigned short FlibHndl, IODBBUSPRM *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    odb out

    Pointer to the IODBBUSPRM structure including the bus parameter. The IODBBUSPRM structure is as follows.

    typedef struct {
        char           fdl_add ;
        char           baudrate ;
        unsigned short tsl ;
        unsigned short min_tsdr ;
        unsigned short max_tsdr ;
        unsigned char  tqui ;
        unsigned char  tset ;
        long           ttr ;
        char           gap ;
        char           hsa ;
        char           max_retry ;
        unsigned char  bp_flag ;
        unsigned short min_slv_int ;
        unsigned short poll_tout ;
        unsigned short data_cntl ;
        char           reserve1[6] ;
        char           cls2_name[32] ;
        short          user_dlen ;
        char           user_data[62] ;
        char           reserve2[96] ;
    } IODBBUSPRM ;
    
    fdl_add
    Station number of DP-Master is stored.
    baudrate
    Code number of baudrate is stored.
    0 : 9.6Kbps 1 : 19.2Kbps 2 : 93.75Kbps
    3 : 187.5Kbps 4 : 500Kbps 6 : 1.5Mbps
    7 : 3Mbps 8 : 6Mbps 9 : 12Mbps
    tsl
    The maximum time that the initiator waits forthe complete receipt of the first frame character of the immediate acknowledgement or response, after transmitting a token frame is stored.
    min_tsdr
    Minimum progress time from the final bit of the transmitting or receiving data to the top bit of the next transmitting or receiving data is stored.
    max_tsdr
    Maximum progress time from the final bit of the transmitting or receiving data to the top bit of the next transmitting or receiving data is stored.
    tqui
    After data were transmitted, the waiting time until the receiver is moved is stored.
    tset
    The time after an event occurs until an action is carried out is stored.
    ttr
    The anticipated time for one token to make a round on the PROFIBUS is stored.
    gap
    The number of the token making the rounds between the GAP maintenance cycle is stored.
    hsa
    The maximum node number set on PROFIBUS is stored.
    max_retry
    The maximum number of retries is stored.
    bp_flag
    The meaning of each bit is as follows.
    BIT7
    0 : The User-Interface will remain in the operation mode in the case of an error.
    1 : The operation mode will change from Operate to Clear in the case of an error.
    * BIT0 to BIT6 are not used.
    min_slv_int
    Minimum time between two slave poll cycles is stored.
    poll_tout
    In the case of master-master communication, the maximum waiting time to obtaining the response after request is sent is stored.
    data_cntl
    The time during which the Data Transfer List will be updated at least once and will be made available to the user is stored.
    reserve1
    not used
    cls2_name
    not used
    user_dlen
    The number of bytes of specific data which is neccesary for the bus parameter set from the maker is stored.
    user_data
    The specific data which is neccesary for the bus parameter set from the maker is stored. The data of the number of bytes returned to above-mentioned user_dlen is effective.
    reserve2
    not used


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfrdconfig

    Reads the series/version of PROFIBUS-DP software.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdconfig(unsigned short FlibHndl, ODBPRFCNF *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    odb out

    Pointer to the ODBPRFCNF structure including the series/version of PROFIBUS software. The ODBPRFCNF structure is as follows.

    typedef struct {
        char    master_ser[5]; /* Series of master function */
        char    master_ver[3]; /* Version of master function */
        char    slave_ser[5];  /* Series of slave function */
        char    slave_ver[3];  /* Version of slave function */
        char    cntl_ser[5];   /* Series of PROFIBUS control software */
        char    cntl_ver[3];   /* Version of PROFIBUS control software */
    } ODBPRFCNF ;
    
    master_ser
    Series of master function is stored.
    master_ver
    Version of master function is stored.
    slave_ser
    Series of slave function is stored.
    slave_ver
    Version of slave function is stored.
    cntl_ser
    Series of PROFIBUS control software is stored.
    cntl_ver
    Version of PROFIBUS control software is stored.
    * Series are stored in ASCII code(4 byte + 'NULL').
    Version are stored in ASCII code(2 byte + 'NULL').
    In case of no option, first character is 'NULL'.


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is
  • The PROFIBUS-DP master or slave function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrddido

    Reads the DI/DO address data allocated in the slot of each slave station.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrddido(unsigned short FlibHndl, short idx, IODBDIDO *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the index number for DI/DO address data. (0 - 47)

    odb out

    Pointer to the IODBDIDO structure storing the DI/DO address data.
    The IODBDIDO structure is as follows.

    typedef struct {
        short          slave_no ;
        short          slot_no ;
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        short          shift;
        unsigned char  module_dlen ;
        char           module_data[128] ;
    } IODBDIDO ;
    
    slave_no
    The station number of the DP-Slave is stored.(0-125)
    In case that the specified index number is final or unsetting, "-1" is stored.
    slot_no
    The slot number is stored. (0-23)
    di_size
    The size of area used as buffer for DI data is stored.
    di_type
    The kind of the PMC address used as a buffer for the DI data is stored with ASCII CODE.
    di_addr
    The top number of the PMC address used as a buffer for the DI data is stored.
    When this data is not set, the "0xFFFF" is stored.
    do_size
    The size of area used as buffer for DO data is stored.
    do_type
    The kind of the PMC address used as a buffer for the DO data is stored with ASCII CODE.
    do_addr
    The top number of the PMC address used as a buffer for the DO data is stored.
    When this data is not set, the "0xFFFF" is stored.
    shift
    The data that indicates if the area whose size is specified by "module_dlen" is newly allocated is stored.
    1 (ON) allocated
    0 (OFF) not allocated
    module_dlen
    The data length of "Module" keyword in GSD file is stored. (0 - 128)
    module_data
    The data of "Module" keyword in GSD file is stored.
    The data of the number of bytes returned to above-mentioned module_dlen is effective.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP slave function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrdindiadr

    Reads the indication address for communication mode of master function.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdindiadr(unsigned short FlibHndl, IODBINDEADR *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    odb out

    Pointer to the IODBINDEADR structure storing the indication address of master function.
    The IODBINDEADR structure is as follows.

    typedef struct {
        unsigned char  dummy ;
        char           indi_type ;
        unsigned short indi_addr ;
    } IODBINDEADR ;
    
    indi_type
    The kind of the PMC address used as a indication address is stored with ASCII CODE.
    indi_addr
    The top number of the PMC address used as a indication address is stored.
    When this data is not set, the "0xFFFF" is stored.


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrdopmode

    Reads the operation mode of master function.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdopmode(unsigned short FlibHndl, short *mode) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode out

    Pointer to the variable to which the operation mode of master function will be stored.
    The following value is set.

    0 : OFFLINE
    1 : STOP
    2 : CLEAR
    3 : OPERATE


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrdslvaddr

    Reads the address allocation of slave function.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    This function is also available at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdslvaddr(unsigned short FlibHndl, IODBSLVADR *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    odb out

    Pointer to the IODBSLVADR structure including the address allocation. The IODBSLVADR structure is as follows.

    typedef struct {
        char           slave_no ;
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        char           reserve[7] ;
    } IODBSLVADR ;
    
    slave_no
    The station number of the DP-Slave is stored.
    di_size
    The size of area used as buffer of DI data is stored.
    di_type
    The kind of the PMC address used as a buffer of the DI data is stored with ASCII CODE.
    di_addr
    The top number of the PMC address used as a buffer of the DI data is stored.
    do_size
    The size of area used as buffer of DO data is stored.
    do_type
    The kind of the PMC address used as a buffer of the DO data is stored with ASCII CODE.
    do_addr
    The top number of the PMC address used as a buffer of the DO data is stored.
    reserve
    not used


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP slave function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfrdslvid

    Reads the slave index data that assigns the I/O module allocation for the specified Index number.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdslvid(unsigned short FlibHndl, short idx, IODBSLVID *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the slave index number. (0-47)

    odb out

    Pointer to the IODBSLVID structure storing the slave index data.
    The IODBSLVID structure is as follows.

    typedef struct {
        short          dis_enb ;
        short          slave_no ;
        short          nsl ;
        unsigned char  dgn_size ;
        char           dgn_type ;
        unsigned short dgn_addr ;
    } IODBSLVID ;
    
    dis_enb
    The state that indicates whether the master communicates with the specified DP-slave is stored.
    0 DISABLE Communication disabled
    1 ENABLE Communication enabled
    slave_no
    The station number of the DP-Slave is stored.
    When this data is not set, the "-1" is stored.
    nsl
    The number of I/O module units which are installed in the corresponding slave station is stored.
    When this data is not set, the "-1" is stored.
    dgn_size
    The size of the area where the diagnosis data is read is stored.
    dgn_type
    The kind of the PMC address used as an area where the diagnosis data is read is stored with ASCII CODE.
    dgn_addr
    The top number of the PMC address used as an area where the diagnosis data is read is stored.
    When this data is not set, the "0xFFFF" is stored.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrdslvprm

    Reads the slave parameter of the specified slave number.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    This function is unavailable at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdslvprm(unsigned short FlibHndl, short slave_no, void *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slave_no in

    Specify the slave number to read. (0-125)

    odb out

    Pointer to the structure including the slave parameter. This structure is different depending on the version of control software of PROFIBUS-DP(6557 Series).

    In case of Version 01 to 07:
    Pointer to the IODBSLVPRM structure.
    The IODBSLVPRM structure is as follows.
    typedef struct {
        short          dis_enb ;
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[32] ;
        short          cnfg_dlen ;
        char           cnfg_data[126] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
        char           reserve3[8] ;
    } IODBSLVPRM ;
    
    In case of Version 09 or later:
    Pointer to the IODBSLVPRM2 structure.
    The IODBSLVPRM2 structure is as follows.
    typedef struct {
        short          dis_enb ;
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[206] ;
        short          cnfg_dlen ;
        char           cnfg_data[126] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
        char           reserve3[8] ;
    } IODBSLVPRM2 ;
    
    dis_enb
    Whether to communicate with the DP-Slave of the specified slave number is stored.
    0 : DISABLE Communication is not done.
    1 : ENABLE Communication is done.
    ident_no
    The identification number of DP-Slave is stored.
    slv_flag
    The slave flag is stored. The meaning of each bit is as follows.
    BIT7
    0 : DP-Slave will not be activated.
    1 : DP-Slave will be activated.
    BIT6
    0 : New parameter data will not be transferred.
    1 : New parameter data will be transferred.

    * BIT0 to BIT5 are not used.

    slv_type
    The slave type of the maker specification is stored.
    reserve1
    not used
    slv_stat
    The slave status is stored. The meaning of each bit is as follows.
    In case of BIT7=ON, BIT6=OFF
    The DP-Slave cannot change the parameter from the DP-Master.
    In case of BIT7=OFF, BIT6=ON
    The DP-Slave can change the parameter from the DP-Master.
    BIT5
    0 : OFF The Sync control command can not be used.
    1 : ON The Sync control command can be used.
    BIT4
    0 : OFF The Freeze control command can not be used.
    1 : ON The Freeze control command can be used.
    BIT3
    0 : OFF The Watchdog control is not done.
    1 : ON The Watchdog control is done.

    * BIT0 to BIT2 are not used.

    wd_fact1
    The coefficient to decide the time of the Watchdog control is stored.
    wd_fact2
    The coefficient to decide the time of the Watchdog control is stored.

    * The Watchdog control time, wd_fact1, and the wd_fact2
    The Watchdog control time(msec) = 10 * wd_fact1 * wd_fact2
    min_tsdr
    The minimum wait time to send the response to DP-Master is stored.
    reserve2
    not used
    grp_ident
    The group for the DDLM_Global_Control function is stored.
    user_plen
    The number of bytes of specific data which is neccesary for the slave parameter set from the maker is stored.
    user_pdata
    The specific data which is neccesary for the slave parameter set from the maker is stored. The data of the number of bytes returned to above-mentioned user_plen is effective.
    cnfg_dlen
    The number of bytes of data to specify DI/DO size for the data exchange between DP-Master and DP-Slave is stored.
    cnfg_data
    The data to specify DI/DO size for the data exchange between DP-Master and DP-Slave is stored. The data of the number of bytes returned to above-mentioned cnfg_dlen is effective.
    slv_ulen
    The number of bytes of specified data from the maker side to show the characteristic of the DP-Slave is stored.
    slv_udata
    The specified data from the maker side to show the characteristic of the DP-Slave is stored. The data of the number of bytes returned to above-mentioned slv_ulen is effective.
    reserve3
    not used


    ERRORS

    Code Description
    EW_RANGE data number error
    Slave number(slave_no) is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfrdslvprm2

    Reads the slave parameter of the specified slave Index number.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdslvprm2(unsigned short FlibHndl, short idx, IODBSLVPRM3 *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the slave index number. (0 - 47)

    odb out

    Pointer to the IODBSLVPRM3 structure storing the slave parameter.
    The IODBSLVPRM3 structure is as follows.

    typedef struct {
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[206] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
    } IODBSLVPRM3 ;
    
    ident_no
    The identification number of DP-Slave is stored.
    slv_flag
    The slave flag is stored. The meaning of each bit is as follows.
    BIT7
    0 DP-Slave will not be activated.
    1 DP-Slave will be activated.
    BIT6
    0 New parameter data will not be transmitted.
    1 New parameter data will be transmitted.

    * BIT0 to BIT5 are not used.

    slv_type
    The slave type of the maker specification is stored.
    reserve1
    not used
    slv_type
    The slave type of the maker specification is stored.
    reserve1
    not used
    slv_stat
    The slave status is stored. The meaning of each bit is as follows.
    In case of BIT7=ON, BIT6=OFF
    The DP-Slave cannot change the parameter from the DP-Master.
    In case of BIT7=OFF, BIT6=ON
    The DP-Slave can change the parameter from the DP-Master.
    BIT5
    0 : OFF The Sync control command can not be used.
    1 : ON The Sync control command can be used.
    BIT4
    0 : OFF The Freeze control command can not be used.
    1 : ON The Freeze control command can be used.
    BIT3
    0 : OFF The Watchdog control is not done.
    1 : ON The Watchdog control is done.

    * BIT0 to BIT2 are not used.

    wd_fact1
    The coefficient to decide the time of the Watchdog control is stored.
    wd_fact2
    The coefficient to decide the time of the Watchdog control is stored.

    * The Watchdog control time, wd_fact1, and the wd_fact2
    The Watchdog control time(msec) = 10 * wd_fact1 * wd_fact2
    min_tsdr
    The minimum wait time to send the response to DP-Master is stored.
    reserve2
    not used
    grp_ident
    The group for the DDLM_Global_Control function is stored.
    user_plen
    The number of bytes of specified data which is necessary for the slave parameter set from the maker is stored.
    user_pdata
    The specified data which is necessary for the slave parameter set from the maker is stored.
    The data of the number of bytes returned to above-mentioned user_plen is effective.
    slv_ulen
    The number of bytes of specified data from the maker side to show the characteristic of the DP-Slave is stored.
    slv_udata
    The specified data from the maker side to show the characteristic of the DP-Slave is stored.
    The data of the number of bytes returned to above-mentioned slv_ulen is effective.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfrdslvstat

    Reads the state of slave function.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    This function is also available at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfrdslvstat(unsigned short FlibHndl, ODBSLVST *odb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    odb out

    Pointer to the ODBSLVST structure including the state of slave function. The ODBSLVST structure is as follows.

    typedef struct {
        unsigned char  cnfg_stat ;
        unsigned char  prm_stat ;
        char           wdg_stat ;
        unsigned char  live_stat ;
        short          ident_no ;
    } ODBSLVST ;
    
    cnfg_stat
    Whether "CONFIG DATA" of the slave parameter of the DP-Master and Configration Data which the DP-Slave are recognizing is equal is stored.
    FF : Initialized condition
    00 : DP-Master is communicating with DP-Slave normally.
    01 : Unusual status
    prm_stat
    Whether "USER PRM DATA" of the slave parameter of the DP-Master and Parameter Data which the DP-Slave are recognizing is equal is stored.
    FF : Initialized condition
    00 : DP-Master is communicating with DP-Slave normally.
    01 : Unusual status
    wdg_stat
    The status of communication between a DP-Master and a DP-Slave is stored.
    00 : Connecting
    01 : Disconnecting
    live_stat
    Whether the software of the slave function works normally is stored. The count up is repeated from 00 to the FF while normally operating.
    ident_no
    The identification number of DP-Slave is stored.


    ERRORS

    Code Description
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP slave function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfwrallcadr

    Sets the address allocation to the specified slave number.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is unavailable at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrallcadr(unsigned short FlibHndl, short slave_no, IODBPRFADR *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slave_no in

    Specify the slave number to set.

    idb in

    Pointer to the IODBPRFADR structure including the address allocation. The IODBPRFADR structure is as follows.

    typedef struct {
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        short          reserve1;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        short          reserve2;
        unsigned char  dgn_size;
        char           dgn_type;
        unsigned short dgn_addr;
    } IODBPRFADR ;
    
    di_size
    Specify the size of area used as buffer of DI data.
    6557 Series Version 01-07 : (0-32)
    6557 Series Version 09 or later : (0-244)
    di_type
    Specify the kind of the PMC address used as a buffer of the DI data with ASCII CODE.
    di_addr
    Specify the top number of the PMC address used as a buffer of the DI data.
    reserve1
    not used
    do_size
    Specify the size of area used as buffer of DO data.
    6557 Series Version 01-07 : (0-32)
    6557 Series Version 09 or later : (0-244)
    do_type
    Specify the kind of the PMC address used as a buffer of the DO data with ASCII CODE.
    do_addr
    Specify the top number of the PMC address used as a buffer of the DO data.
    reserve2
    not used
    dgn_size
    Specify the size of the area where the diagnosis data is read. (0-32)
    6557 Series Version 01-07 : (0-32)
    6557 Series Version 09 or later : (0-244)
    dgn_type
    Specify the kind of the PMC address used as an area where the diagnosis data is read with ASCII CODE.
    dgn_addr
    Specify the top number of the PMC address used as an area where the diagnosis data is read.
    * 6557 Series Version 09 or later:

    Set parameter di_size and do_size so that the total of the two parameter lengths does not exceed 244.


    ERRORS

    Code Description
    EW_RANGE data number error
    Slave number(slave_no) is wrong.
    EW_DATA Data error
    The specification of the address allocation is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 : di_size is wrong.
    2 : di_type is wrong.
    3 : di_addr is wrong.
    4 : do_size is wrong.
    5 : do_type is wrong.
    6 : do_addr is wrong.
    7 : dgn_size is wrong.
    8 : dgn_type is wrong.
    9 : dgn_addr is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfwrbusprm

    Writes the bus parameter of master function.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is also available at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrbusprm(unsigned short FlibHndl, IODBBUSPRM *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idb in

    Pointer to the IODBBUSPRM structure including the bus parameter. The IODBBUSPRM structure is as follows.

    typedef struct {
        char           fdl_add ;
        char           baudrate ;
        unsigned short tsl ;
        unsigned short min_tsdr ;
        unsigned short max_tsdr ;
        unsigned char  tqui ;
        unsigned char  tset ;
        long           ttr ;
        char           gap ;
        char           hsa ;
        char           max_retry ;
        unsigned char  bp_flag ;
        unsigned short min_slv_int ;
        unsigned short poll_tout ;
        unsigned short data_cntl ;
        char           reserve1[6] ;
        char           cls2_name[32] ;
        short          user_dlen ;
        char           user_data[62] ;
        char           reserve2[96] ;
    } IODBBUSPRM ;
    
    fdl_add
    Specify station number of DP-Master.(0-125)
    baudrate
    Specify code number of baudrate.
    0 : 9.6Kbps 1 : 19.2Kbps 2 : 93.75Kbps
    3 : 187.5Kbps 4 : 500Kbps 6 : 1.5Mbps
    7 : 3Mbps 8 : 6Mbps 9 : 12Mbps
    tsl
    Specify the maximum time that the initiator waits for the complete receipt of the first frame character of the immediate acknowledgement or response, after transmitting a token frame. (1-65535)
    min_tsdr
    Specify minimum progress time from the final bit of the transmitting or receiving data to the top bit of the next transmitting or receiving data. (1-65535)
    max_tsdr
    Specify maximum progress time from the final bit of the transmitting or receiving data to the top bit of the next transmitting or receiving data. (1-65535)
    tqui
    Specify after data were transmitted, the waiting time until the receiver is moved. (0-255)
    tset
    Specify the time after an event occurs until an action is carried out is stored. (1-255)
    ttr
    Specify the anticipated time for one token to make a round on the PROFIBUS. (1-1677215)
    gap
    Specify the number of the token making the rounds between the GAP maintenance cycle. (1-100)
    hsa
    Specify the maximum node number set on PROFIBUS. (2-126)
    max_retry
    Specify the maximum number of retries. (1-8)
    bp_flag
    Specify the flag for the user's interface. The meaning of each bit is as follows.
    BIT7
    0 : The User-Interface will remain in the operation mode in the case of an error.
    1 : The operation mode will change from Operate to Clear in the case of an error.
    * BIT0 to BIT6 are not used.
    min_slv_int
    Specify minimum time between two slave poll cycles. (1-65535)
    poll_tout
    In the case of master-master communication, specify the maximum waiting time to obtaining the response after request is sent. (1-65535)
    data_cntl
    Specify the time during which the Data Transfer List will be updated at least once and will be made available to the user. (1-65535)
    reserve1
    not used
    cls2_name
    not used
    user_dlen
    Specify the number of bytes of specific data which is neccesary for the bus parameter set from the maker.(0-62)
    user_data
    Specify the specific data which is neccesary for the bus parameter set from the maker. The data of the number of bytes returned to above-mentioned user_dlen is effective.
    reserve2
    not used


    ERRORS

    Code Description
    EW_DATA Data error
    The bus parameter is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 : fdl_add is wrong.
    2 : baudrate is wrong.
    3 : tsl is wrong.
    4 : min_tsdr is wrong.
    5 : max_tsdr is wrong.
    6 : tset is wrong.
    7 : ttr is wrong.
    8 : gap is wrong.
    9 : hsa is wrong.
    10 : max_retry is wrong.
    11 : min_slv_int is wrong.
    12 : poll_tout is wrong.
    13 : data_cntl is wrong.
    14 : user_dlen is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfwrdido

    Writes the DI/DO address data allocated in the slot of each slave station.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrdido(unsigned short FlibHndl, short idx, IODBDIDO *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the index number for DI/DO address data. (0 - 47)
    When "-1" is specified, slave_no and slot_no in the IODBDIDO structure are effective. (When the data of specified slave_no and slot_no exist, the following data is updated.)

    idb in

    Pointer to the IODBDIDO structure including the DI/DO address data.
    The IODBDIDO structure is as follows.

    typedef struct {
        short          slave_no ;
        short          slot_no ;
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        short          shift;
        unsigned char  module_dlen ;
        char           module_data[128] ;
    } IODBDIDO ;
    
    slave_no
    Specify the slave station number of the DP-Slave. (0-125) (It is effective at only idx=-1.)
    slot_no
    Specify the slot number. (0-23) (It is effective at only idx=-1.)
    di_size
    Specify the size of area used as buffer for DI data. (0-244)
    di_type
    Specify the kind of the PMC address used as a buffer for the DI data with ASCII CODE.
    di_addr
    Specify the top number of the PMC address used as a buffer for the DI data.
    When you want to initialize this data, please set "0xFFFF".
    do_size
    Specify the size of area used as buffer for DO data. (0-244)
    do_type
    Specify the kind of the PMC address used as a buffer for the DO data with ASCII CODE.
    do_addr
    Specify the top number of the PMC address used as a buffer for the DO data.
    When you want to initialize this data, please set "0xFFFF".
    shift
    Sets the data that indicates if the area whose size is specified by "module_dlen" is newly allocated.
    1 (ON) allocated
    0 (OFF) not allocated
    module_dlen
    Specify the data length of "Module" keyword in GSD file. (0 - 128)
    * Further, as for one slave, the total of every module size should be within 128 bytes.
    module_data
    Sets the data for "Module" keyword in GSD file.
    The data of the number of bytes returned to above-mentioned module_dlen is effective.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    When "idx=-1" is specified, if idb->slave_no or idb->slot_no is wrong, this error occurs.
    EW_DATA Data error
    The specification of the address allocation is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBPMCERR structure.
    3 di_size is wrong.
    4 di_type is wrong.
    5 di_addr is wrong.
    6 do_size is wrong.
    7 do_type is wrong.
    8 do_addr is wrong.
    9 shift is wrong.
    10 module_dlen is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfwrindiadr

    Writes the indication address for communication mode of master function.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrindiadr(unsigned short FlibHndl, IODBINDEADR *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idb in

    Pointer to the IODBINDEADR structure including the indication address of master function.
    The IODBINDEADR structure is as follows.

    typedef struct {
        unsigned char  dummy ;
        char           indi_type ;
        unsigned short indi_addr ;
    } IODBINDEADR ;
    
    indi_type
    Specify the kind of the PMC address used as a indication address with ASCII CODE.
    indi_addr
    Specify the top number of the PMC address used as a indication address.
    When you want to initialize this data, please set "0xFFFF".


    ERRORS

    Code Description
    EW_DATA Data error
    The specification of the address allocation is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 indi_type is wrong.
    2 indi_addr is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfwropmode

    Writes the operation mode of master function.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwropmode(unsigned short FlibHndl, short mode, short *res) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode in

    Specify the operation mode for master function.

    0 : OFFLINE
    1 : STOP
    2 : CLEAR
    3 : OPERATE

    res out

    The message number as the result of setting the operation mode is set.

    0 : No message
    1 : "MODE SET OK"
    2 : "INVALID OPERATION"
    3 : "MODE SET ERROR"
    4 : "POWER MUST BE OFF"


    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The operation mode(mode) was wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfwrslvaddr

    Sets the address allocation of slave function.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is also available at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrslvaddr(unsigned short FlibHndl, IODBSLVADR *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idb in

    Pointer to the IODBSLVADR structure including the address allocation. The IODBSLVADR structure is as follows.

    typedef struct {
        char           slave_no ;
        unsigned char  di_size ;
        char           di_type ;
        unsigned short di_addr ;
        unsigned char  do_size ;
        char           do_type ;
        unsigned short do_addr ;
        char           reserve[7] ;
    } IODBSLVADR ;
    
    slave_no
    Specify the station number of the DP-Slave.(0-125)
    In case of 6558 system, the address allocation data can be initialized by specifying "-1".
    di_size
    Specify the size of area used as buffer of DI data.
    6557 Series Version 01-07 : (1-32)
    6557 Series Version 09 or later : (0-244)
    di_type
    Specify the kind of the PMC address used as a buffer of the DI data with ASCII CODE.
    di_addr
    Specify the top number of the PMC address used as a buffer of the DI data.
    do_size
    Specify the size of area used as buffer of DO data.
    6557 Series Version 01-07 : (1-32)
    6557 Series Version 09 or later : (0-244)
    do_type
    Specify the kind of the PMC address used as a buffer of the DO data with ASCII CODE.
    do_addr
    Specify the top number of the PMC address used as a buffer of the DO data.
    reserve
    not used

    * 6557 Series Version 09 or later:
    Set parameter di_size and do_size so that the total of the two parameter lengths does not exceed 244.


    ERRORS

    Code Description
    EW_DATA Data error
    The specification of the address allocation is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 : slave_no is wrong.
    2 : di_size is wrong.
    3 : di_type is wrong.
    4 : di_addr is wrong.
    5 : do_size is wrong.
    6 : do_type is wrong.
    7 : do_addr is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP slave function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfwrslvid

    Writes the slave index data that assigns the I/O module allocation for the specified Index number.
    The slot allocation of each slave station can be changed by this function.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.

    Once the system is powered-off and on, configured entries are sorted in the order of "NO" (Slave number) automatically.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrslvid(unsigned short FlibHndl, short idx, IODBSLVID *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the slave index number. (0-47)

    idb in

    Pointer to the IODBSLVID structure including the slave index data.
    The IODBSLVID structure is as follows.

    typedef struct {
        short          dis_enb ;
        short          slave_no ;
        short          nsl ;
        unsigned char  dgn_size ;
        char           dgn_type ;
        unsigned short dgn_addr ;
    } IODBSLVID ;
    
    dis_enb
    Specify whether the master communicates with the specified DP-Slave.
    0 DISABLE Communication disabled
    1 ENABLE Communication enabled
    slave_no
    Specify the station number of the DP-Slave.(-1,0-125)
    When you want to initialize the data of specified slave index number, please set "-1".
    nsl
    Specify the number of I/O module units which are installed in the corresponding slave station.
    Only using Master 1-24
    When using both Master and Slave 1-8
    When you want to initialize this data, please set "-1".
    dgn_size
    Specify the size of the area where the diagnosis data is read. (0-242)
    dgn_type
    Specify the kind of the PMC address used as an area where the diagnosis data is read with ASCII CODE.
    dgn_addr
    Specify the top number of the PMC address used as an area where the diagnosis data is read.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    EW_DATA Data error
    The bus parameter is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 dis_enb is wrong.
    2 slave_no is wrong.
    3 nsl is wrong.
    4 dgn_size is wrong.
    5 dgn_type is wrong.
    6 dgn_addr is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • profibus\pmc_prfwrslvprm

    Writes the slave parameter of the specified slave number.

    This function is available at the version 01-07 and 09 or later of the PROFIBUS-DP control software(6557 Series). In the control software in the version 08, the return value becomes EW_VERSION.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is unavailable at the 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrslvprm(unsigned short FlibHndl, short slave_no, void *idb) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    slave_no in

    Specify the slave number to write. (0〜125)

    idb in

    Pointer to the structure including the slave parameter. This structure is different depending on the version of control software of PROFIBUS-DP(6557 Series).

    In case of Version 01 to 07:
    Pointer to the IODBSLVPRM structure. The IODBSLVPRM structure is as follows.
    typedef struct {
        short          dis_enb ;
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[32] ;
        short          cnfg_dlen ;
        char           cnfg_data[126] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
        char           reserve3[8] ;
    } IODBSLVPRM ;
    
    In case of Version 09 or later:
    Pointer to the IODBSLVPRM2 user define type. The IODBSLVPRM2 structure is as follows.
    typedef struct {
        short          dis_enb ;
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[206] ;
        short          cnfg_dlen ;
        char           cnfg_data[126] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
        char           reserve3[8] ;
    } IODBSLVPRM2 ;
    
    dis_enb
    Specify whether to communicate with the DP-Slave of the specified slave number.
    0 : DISABLE Communication is not done.
    1 : ENABLE Communication is done.
    ident_no
    Specify the identification number of DP-Slave.
    slv_flag
    Specify the slave flag. The meaning of each bit is as follows.
    BIT7
    0 : DP-Slave will not be activated.
    1 : DP-Slave will be activated.
    BIT6
    0 : New parameter data will not be transferred.
    1 : New parameter data will be transferred.

    * BIT0 to BIT5 are not used.

    slv_type
    Specify the slave type of the maker specification. (0-255)
    reserve1
    not used
    slv_stat
    Specify the slave status. The meaning of each bit is as follows.
    In case of BIT7=ON, BIT6=OFF
    The DP-Slave cannot change the parameter from the DP-Master.
    In case of BIT7=OFF, BIT6=ON
    The DP-Slave can change the parameter from the DP-Master.
    BIT5
    0 : OFF The Sync control command can not be used.
    1 : ON The Sync control command can be used.
    BIT4
    0 : OFF The Freeze control command can not be used.
    1 : ON The Freeze control command can be used.
    BIT3
    0 : OFF The Watchdog control is not done.
    1 : ON The Watchdog control is done.

    * BIT0 to BIT2 are not used.

    wd_fact1
    Specify the coefficient to decide the time of the Watchdog control. (1-255)
    wd_fact2
    Specify the coefficient to decide the time of the Watchdog control. (1-255)

    * The Watchdog control time, wd_fact1, and the wd_fact2 relation are as follows.
    The Watchdog control time(msec) = 10 * wd_fact1 * wd_fact2
    min_tsdr
    Specify the minimum wait time to send the response to DP-Master. (1-255)
    reserve2
    not used
    grp_ident
    Specify the group for the DDLM_Global_Control function.
    user_plen
    Specify the number of bytes of specific data which is neccesary for the slave parameter set from the maker.
    6557 Series Version 01-07 : (0-32)
    6557 Series Version 09 or later : (0-206)
    user_pdata
    Specify the specific data which is neccesary for the slave parameter set from the maker. The data of the number of bytes returned to above-mentioned user_plen is effective.
    cnfg_dlen
    Specify the number of bytes of data to specify DI/DO size for the data exchange between DP-Master and DP-Slave. (0-126)
    cnfg_data
    Specify the data to specify DI/DO size for the data exchange between DP-Master and DP-Slave. The data of the number of bytes returned to above-mentioned cnfg_dlen is effective.
    slv_ulen
    Specify the number of bytes of specified data from the maker side to show the characteristic of the DP-Slave. (0-30)
    slv_udata
    Specify the specified data from the maker side to show the characteristic of the DP-Slave. The data of the number of bytes returned to above-mentioned slv_ulen is effective.
    reserve3
    not used

    * 6557 Series Version 09 or later:
    Set values for parameters user_plen, cnfg_dlen, and slv_ulen so that the total of the three parameter lengths does not exceed 207.


    ERRORS

    Code Description
    EW_RANGE data number error
    Slave number(slave_no) is wrong.
    EW_DATA Data error
    The slave parameter is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function. The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 : dis_enb is wrong.
    2 : wd_fact1 is wrong.
    3 : wd_fact2 is wrong.
    4 : min_tsdr is wrong.
    5 : user_plen is wrong.
    6 : cnfg_dlen is wrong.
    7 : slv_ulen is wrong.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • EW_VERSION Version of PROFIBUS-DP control software is wrong.
    This function was called by version 08 of the control software. Exchange the control software besides the version 08.

    profibus\pmc_prfwrslvprm2

    Writes the slave parameter of the specified slave Index number.
    When the parameters are changed, the restart of CNC is required for putting the change into effect.
    This function is only for 6558 Series.

    * Please refer to "PROFIBUS-DP function manual" for details of the PROFIBUS-DP function.


    PROTOTYPE

    FWLIBAPI short WINAPI pmc_prfwrslvprm2(unsigned short FlibHndl, short idx, IODBSLVPRM3 *idb);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    idx in

    Specify the slave index number. (0 - 47)

    idb in

    Pointer to the IODBSLVPRM3 structure including the slave parameter.
    The IODBSLVPRM3 structure is as follows.

    typedef struct {
        unsigned short ident_no ;
        unsigned char  slv_flag ;
        unsigned char  slv_type ;
        char           reserve1[12] ;
        unsigned char  slv_stat ;
        unsigned char  wd_fact1 ;
        unsigned char  wd_fact2 ;
        unsigned char  min_tsdr ;
        char           reserve2 ;
        unsigned char  grp_ident ;
        short          user_plen ;
        char           user_pdata[206] ;
        short          slv_ulen ;
        char           slv_udata[30] ;
    } IODBSLVPRM3 ;
    
    ident_no
    Specify the identification number of DP-Slave.
    slv_flag
    Specify the slave flag. The meaning of each bit is as follows.
    BIT7
    0 DP-Slave will not be activated.
    1 DP-Slave will be activated.
    BIT6
    0 New parameter data will not be transferred.
    1 New parameter data will be transferred.

    * BIT0 to BIT5 are not used.

    slv_type
    Specify the slave type of the maker specification. (0-255)
    reserve1
    not used
    slv_stat
    Specify the slave status. The meaning of each bit is as follows.
    In case of BIT7=ON, BIT6=OFF
    The DP-Slave cannot change the parameter from the DP-Master.
    In case of BIT7=OFF, BIT6=ON
    The DP-Slave can change the parameter from the DP-Master.
    BIT5
    0 OFF The Sync control command can not be used.
    1 ON The Sync control command can be used.
    BIT4
    0 OFF The Freeze control command can not be used.
    1 ON The Freeze control command can be used.
    BIT3
    0 OFF The Watchdog control is not activated.
    1 ON The Watchdog control is activated.

    * BIT0 to BIT2 are not used.

    wd_fact1
    Specify the coefficient to decide the time of the Watchdog control. (1-255)
    wd_fact2
    Specify the coefficient to decide the time of the Watchdog control. (1-255)

    * The relation between Watchdog control time and wd_fact1, wd_fact2 is as follows.
    Watchdog control time(msec) = 10 * wd_fact1 * wd_fact2
    min_tsdr
    Specify the minimum wait time to send the response to DP-Master. (1-255)
    reserve2
    not used
    grp_ident
    Specify the group for the DDLM_Global_Control function.
    user_plen
    Specify the number of bytes of specified data. (0-206)
    user_pdata
    Specify the specified data which is necessary for the slave parameter set from the maker.
    The data of the number of bytes returned to above-mentioned user_plen is effective.
    slv_ulen
    Specify the number of bytes of specified data from the maker side to show the characteristic of the DP-Slave. (0-30)
    slv_udata
    Specify the specified data from the maker side to show the characteristic of the DP-Slave.
    The data of the number of bytes returned to above-mentioned slv_ulen is effective.


    ERRORS

    Code Description
    EW_RANGE data number error
    Index number(idx) is wrong.
    EW_DATA Data error
    The slave parameter is wrong.
    In order to get more information for this err_no return value, execute pmc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 wd_fact1 is wrong.
    2 wd_fact2 is wrong.
    3 min_tsdr is wrong.
    4 user_plen is wrong.
    5 slv_ulen is wrong.
    EW_REJECT CNC execution rejection
    The slave index data is not set. In order to get more information for this err_no return value, execute pmc_getdtailerr function.
    The following details status will be set onto the member, err_no of ODBPMCERR structure.
    1 The station number is not set.
    2 The number of I/O module units is not set.
    EW_NOOPT No option
  • The PROFIBUS-DP board(hardware) is necessary.
  • The PROFIBUS-DP control software is necessary.
  • The PROFIBUS-DP master function is necessary.
  • The extended driver/library function is necessary.
  • program\cnc_buff

    Reads the number of empty buffers used for downloading/verification.
    If there is no space for buffer, this function returns error (EW_BUFFER), otherwise, this function set the number of empty buffer.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_buff(unsigned short FlibHndl,ODBBUF *buffer);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    buffer out

    Pointer to the ODBBUF structure including the empty situation.
    The ODBBUF structure is as follows.

    typedef struct odbbuf {
        short   dummy[2] ;      /* Not used. */
        short   data ;          /* Empty counter.(1 - 3) */
    } ODBBUF ;

    ERRORS

    Code Description
    EW_RESET 'RESET or STOP' was pushed.
    Call the cnc_dwnend(HSSB only) or cnc_dwnend3 or cnc_vrfend function.
    EW_BUFFER Buffer full
    There is no space with buffer.

    program\cnc_cdnc

    Sends NC command data to CNC(for DNC operation).

    When the data processing on the CNC side is delayed and the next data cannot be transferred, error(EW_BUFFER) is returned.
    If an application will wait the data transferring, use the cnc_dnc function.

    Except the above-mentioned difference, function is the same ascnc_dnc, so refer to cnc_dnc function for other description.


    Note1) The G130 function of Power Mate i-H cannot be used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_cdnc(unsigned short FlibHndl,char *data, short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    number in

    Specify the number of characters of NC program data.(1,..,256)

    (In case of High Speed DNC of SeriesSeries 16/18/21, 16i/18i/21i, 0i, it is 1,..,40959)

    data out

    Specify the top address of NC program data.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    'RESET or STOP' was pushed.
    Call the cnc_dncend function.
    EW_FUNC cnc_dncstart function has not been executed.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    (In case of High Speed DNC of Series 16/18/21, 16i/18i/21i, 0i : 40959 bytes)
    EW_BUFFER Buffer empty/full
    Retry because the buffer is full.

    program\cnc_cdownload

    Outputs NC program to be registered(downloading).

    When the data processing on the CNC side is delayed and the next data cannot be transferred, error(EW_BUFFER) is returned.
    If an application will wait the data transferring, use the cnc_download function.

    Except the above-mentioned difference, function is the same as "Download NC program(cnc_download)", so refer to cnc_download


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_cdownload(unsigned short FlibHndl,char *data, short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    data in

    Specify the top address of NC program data.

    number in

    Specify the number of characters of NC program data. (1 - 256)


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    CNC required to stop downloading.
    'RESET or STOP' was pushed.(Series 15/15i)
    Call the cnc_dwnend function.
    EW_FUNC cnc_dwnstart function has not been executed.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    EW_DATA Data error
  • The same program number has already been registered.
  • The same program number is selected on CNC.
  • A character which is unavailable for NC program is detected.
  • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
  • See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.
    EW_BUFFER Buffer full
    Retry because the buffer is full.

    program\cnc_condense

    Condenses the specified program or all programs.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_condense(unsigned short FlibHndl,short type, long progno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the following listed kind of the program to be condensed.

    0 : MDI program
    1 : Specified program
    2 : All registered programs

    progno in

    Specify a program number to be condensed.
    It is available when type parameter is 1.


    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    The kind of program (type) is wrong.
    EW_DATA Data error(except 30i/31i/32i, 0i-D/F, PMi-A)
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Some alarm occurs.
    2 : The specified program is not registered.
    3 : The specified program is under operation.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection on CNC side(except 30i/31i/32i, 0i-D/F, PMi-A)
    Protection KEY(DI) turns off.
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    EW_MODE CNC mode error(except 30i/31i/32i, 0i-D/F, PMi-A)
    Select MDI mode in case of MDI Program.
    Select EDIT mode in case of all registered programs.
    EW_REJECT CNC execution denied(except 30i/31i/32i, 0i-D/F, PMi-A)
    MDI edit or Background edit processing in CNC side.

    program\cnc_copyprog

    Copy the NC program.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_copyprog(unsigned short FlibHndl, long src_no, long dst_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    src_no in

    Specify the source NC program number.

    dst_no in

    Specify the destination NC program number.

    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    src_no in

    Specify the source NC program number.

    dst_no in

    Specify the destination NC program number.


    ERRORS

    Code Description
    EW_BUSY Program edit processing
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program specified by the source program number does not exist.
    2 : The program specified by the destination program number is outside of the range.
    3 : The program area is broken.
    13 : Program registration number is full.
    14 : The program specified by the source program number already exists.(16i:except No.3201#2=1)
    15 : The program specified by the destination program number has been selected on the NC side.
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    MDI edit or Background edit processing in CNC side. (except 30i/31i/32i, 0i-D/F, PMi-A)
    EW_PROT Write protection on CNC side
  • Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
  • Specified destination program number is protected by cnc_setpglock function.
  • EW_OVRFLOW Program memory overflow.
    Program registration area is full.
    EW_ALARM Alarm (PS000, PS101) in CNC side (only 16/18/21)
    Release the alarm(PS000 and PS101).

    program\cnc_cupload

    Read NC program registered on the tape memory in CNC (program memory).
    As for the Data window interface, this function is quite the same with the cnc_upload function . Refer to cnc_upload function for the format of input data, etc.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_cupload(unsigned short FlibHndl,ODBUP *upld,unsigned short *number);


    ARGUMENTS

    Name Direction Description

    ERRORS

    Code Description
    EW_FUNC cnc_upstart function has not been executed.
    EW_LENGTH Data block length error
    The read number of characters of NC program number(*number) is 0.

    program\cnc_cverify

    Outputs NC program to be compared with already registered one to CNC.

    When the data processing on the CNC side is delayed and the next data cannot be transferred, error(EW_BUFFER) is returned.
    If an application will wait the data transferring, use the cnc_verify function.

    Except the above-mentioned difference, function is the same as "Verify NC program (cnc_verify)", so refer to "cnc_verify" function for other description.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_cverify(unsigned short FlibHndl, char *data, short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data in

    Specify the top address of NC program data.

    number in

    Specify the number of characters of NC program data. (1 - 256)


    ERRORS

    Code Description
    EW_RESET HSSB
      Reset or stop request
      CNC required to stop verification.
      'RESET or STOP' was pushed.(Series 15/15i)
      Call the cnc_vrfend function.
    Ethernet
      Reset or stop request
      CNC required to stop verification.
      Call the cnc_vrfend function.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    EW_FUNC cnc_vrfstart function has not been executed.
    EW_DATA Data error
    • Any difference has been detected during comparing process.
    • A character which is unavailable for NC program is detected.
    • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    See Description about the timing of error.
    EW_BUFFER Buffer full
    Retry because the buffer is full.

    program\cnc_delall

    Deletes all NC programs registered in CNC.
    This function is a function equal with all NC program deletions by "O-9999".

    The protected programs cannot be deleted.

    In case of Series 15/15i, deletion is delayed under the following condition.

    • Edit processing in the CNC side(include background edit processing)
    • Downloading, verifying


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delall(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Series 15i(Ethernet only)
    • Background edit processing in CNC side
    • Terminate background edit.
    • Downloading, verifying
    • Terminate a downloading, verifying by using cnc_dwnend3, cnc_vrfend function.
    • "OP" signal(DO) on (only EDIT mode or MEMORY mode)
    • Automatic operation is being executed on CNC.

    Series 30i/31i/32i, 0i-D/F, PMi-A
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • Background edit processing in CNC side
    • Terminate background edit.
    • Downloading, verifying
    • Terminate a downloading, verifying by using cnc_dwnend, cnc_vrfend function.
    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    • MEMORY, MDI mode on CNC side
    • Change CNC mode except MEMORY, MDI mode.
    • "OP" signal(DO) on (only EDIT mode or MEMORY mode)
    • Automatic operation is being executed on CNC.
    EW_PROT Write protection on CNC side
    • Protection KEY(DI) turns off.
    • (Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    EW_PASSWD(Ethernet) NC program cannot be deleted because the data is protected.
    (Series 16i/18i/21i, 0i-A/B/C)

    program\cnc_delete

    Deletes the specified NC program registered in CNC.

    The program which is executed or selected in foreground by CNC cannot be deleted.
    And the protected program cannot be deleted.

    In case of Series 15/15i, deletion is delayed under the following condition.

  • Edit processing in the CNC side (include background edit processing)
  • Downloading, verifying
  • In Series 16/18, 16i/18i, 0i-F, 30i, Power Mate i, it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits.
    In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
    See Program number 8 digits for details.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delete(unsigned short FlibHndl,short number);For the program number 8 digits : FWLIBAPI short WINAPI cnc_delete(unsigned short FlibHndl,long number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify program number.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This application is not customized for the program number 8 digits.
    See "Program number 8 digits" for details.
    EW_BUSY Busy
    Series 30i, 0i-D/F, PMi-A, 15i(Ethernet only)
    • Background edit processing in CNC side
    • Terminate background edit.
    • Downloading, verifying
    • Terminate a downloading, verifying by using cnc_dwnend3, cnc_vrfend.
    • "OP" signal(DO) on (only EDIT mode or MEMORY mode)
    • Automatic operation is being executed on CNC.
    • CNC is in the emergency stop.

    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • Background edit processing in CNC side
    • Terminate background edit.
    • Downloading, verifying
    • Terminate a downloading, verifying by using cnc_dwnend, cnc_vrfend.
    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    • MDI mode on CNC side
    • Change CNC mode except MDI mode.
    • "OP" signal(DO) on (only EDIT mode or MEMORY mode)
    • Automatic operation is being executed on CNC.
    • Foreground program selected by CNC
    • Change selected program on CNC.
    EW_DATA Data error
    • Program (number) is not found.
    • Foreground program selected by CNC.(Series 15/15i)
    • Change selected program on CNC.
    EW_PROT Write protection on CNC side
    • Protection KEY(DI) turns off. (Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)
    • Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    EW_PASSWD(Ethernet) Specified program number cannot be deleted because the data is protected. (Series 16i/18i/21i, 0i-A/B/C)

    program\cnc_delprogline

    Deletes the NC program by line basis.

    When you specify the line including O number(ex.""Oxxxx""), this function deletes the character after O number, but doesn't delete O number.

    Example)
    You have the following program you are going to delete by line basis.
    O1234(TEST  PROGRAM) ;
    G01 X0. F100 ;
    X20. ;
    M30 ;
    %
    
    When you delete 3 lines from the line number 0 for the above program, then you get the following result.
    O1234 M30 ;
    %
    

    The conditions of the function about CNC mode and the kind of program are as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    If you have the playback option, TJOG/THND mode is the same as EDIT.

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, unsigned long line_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Specify the program number to delete.
    When you delete the MDI program, you have to specify -1.

    line_no in

    Specify the line number to delete from.
    When you delete from the first line of a program, you have to specify 0.
    When you specify other than the existing line number, you get EW_DATA error as the return code.

    line_len in

    Specify the amount of lines to delete.
    If you specify the lines over the last one, the lines between the specified line and before the last one are deleted.
    The last line is never deleted.


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program number(prog_no) error
    2 : The line number(line_no) error
    3 : The amount of lines(line_len) error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    Protect KEY signal was ON. (Deletion of the MDI program is excluded)(except 30i/31i/32i, 0i-D/F, PMi-A)
    EW_MODE CNC mode error
    EW_REJECT CNC execution denied
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • MDI edit or Background edit processing in CNC side.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.

    program\cnc_delrange

    Deletes the specified NC program(area specified) registered in CNC.


    When the running program is included within the range of the specified program, the running program which included the subprogram is not deleted.

    The selected program by foreground in MEM mode is not deleted.

    And, the protected program is not deleted too.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delrange(unsigned short FlibHndl, long s_number, long e_number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specifyed the start program number which you wants to delete.

    e_number in

    Specify the end program number which you wants to delete.


    ERRORS

    Code Description
    EW_BUSY Busy
    • Alarm on CNC side
    • Reset the alarm on CNC.
    EW_NUMBER Data number error
    Program number(s_number,e_number) is negative.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The start number(s_number) or the end number(e_number) is out of range.
    2 : The start number(s_number) is larger than the end number(e_number).
    3 : The program is not found within the specified range.
    EW_PROT Write protection on CNC side
    Protection KEY(DI) turns off.
    EW_REJECT CNC execution rejection
    MDI edit or Background edit processing in CNC side.

    program\cnc_dnc

    Sends NC command data to CNC(for DNC operation).

    When the data processing on the CNC side is delayed and the data cannot be transferred,
    this function waits until it can be transferred.
    If an application cannot wait, use the cnc_cdnc function.

    The procedure of DNC operation is as follows.

    In case of Series 15, the parameter No.20 must be set to '15'.
    Even if this setting is not done, this function does not return error.

    In case of Series 16/18/21, 0i, Power Mate i, "DMMC" signal(DI)<G042#7> must be on.
    Even if this setting is not done, this function does not return error.

    For transferring the data, there are 16 buffers of 256 bytes in case of Series 15, and there are 4 buffers of 256 bytes in case of Series 16/ 18/21, 16i/18i/21i, 0i, Power Mate i.
    One buffer is used at each cnc_dnc calling without any relation to the data size. Therefore, the maximum size which can be transferred by one calling is 256 bytes.

    For series Series 16/18/21, 16i/18i/21i, 0i system, set the CNC parameter (No.8706#0=1) to make the High Speed DNC interface be available.
    High Speed DNC uses the single data buffer, which is 40K bytes size ring buffer.
    Application can call the cnc_dnc() multiple times until the buffer becomes full.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed.
    Namely, an error status may refrect the result caused by the previously executed cnc_dnc callings.
    And the error status for some cnc_dnc callings just before the finish of DNC transferring is returned by "End of DNC".

    Format of NC command data to be executed

    NC command data to be executed on CNC is a string composed of ASCII characters as following format.

      LF NC command1 LF NC command2 LF ... LF Mxx LF %

      where,
      LF 0x0A ('\n': EOB)
      Mxx M code at the end of the DNC operation(M02,M30,etc.)

    'LF' must be placed at the top of the whole NC commands, and '%' at the end.
    'LF's are added after each NC commands.
    For example, to execute the commands such as

      M3 S2000 ;
      T14 ;
      G0 X10. ;
      G0 Z-5. ;
      M30 ;
    send a following string using cnc_dnc function.
      cnc_dnc( "\nM3S2000\nT14\nG0X10.\nG0Z-5.\nM30\n%", 32 ) ;
    The string data can be sent by multiple cnc_dnc functions.
    For above example, the commands can be sent block by block like this.
      cnc_dnc( "\n", 1 ) ;
      cnc_dnc( "M3S2000\n", 8 ) ;
      cnc_dnc( "T14\n", 4 ) ;
      cnc_dnc( "G0X10.\n", 7 ) ;
      cnc_dnc( "G0Z-5.\n", 7 ) ;
      cnc_dnc( "M30\n", 4 ) ;
      cnc_dnc( "%", 1 ) ;


    Note1) The G130 function of Power Mate i-H cannot be used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dnc(unsigned short FlibHndl,char *data, unsigned short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    number in

    Specify the number of characters of NC program data.(1,..,256)

    (In case of High Speed DNC of SeriesSeries 16/18/21, 16i/18i/21i, 0i, it is 1,..,40959)

    data in

    Specify the top address of NC program data.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    'RESET or STOP' was pushed.
    Call the cnc_dncend function.
    EW_FUNC cnc_dncstart function has not been executed.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    (In case of High Speed DNC of Series 16/18/21, 16i/18i/21i, 0i : 40959 bytes)

    program\cnc_dnc2

    Outputs the NC part program for DNC operation or M198 operation to CNC.

    This function outputs the characters of NC program as long as it is specified by '*length'('length').
    However, if there is no room to store the specified number of character, this function stores the characters as many as possible to fill the buffer and then sets '*length'('length') with the real number of characters which are stored in the buffer.

    In case that this function cannot output at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    When DNC operation or M198 operation is aborted on CNC side, this function returns EW_RESET.
    In this case, call cnc_dncend2 with DNC_CANCEL as the output result in order to terminate the output of NC program.

    Following shows the format of NC part program to be output.

    EOB CMD1 EOB CMD2 EOB ..... CMDn EOB Mxx EOB

    CMD1...n ASCII character string
    EOB LF(0x0A)
    Mxx M code that shows the termination of DNC operation. (M02 or M30, etc.)

    In case of M198 operation, 'M99' must be specified to 'Mxx'.

    Please be careful !!! When dnc function is used with Ethernet, the transfer rate is not secured by the state of the network.
    And, this function is not available to Embedded Ethernet.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dnc2(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    The pointer of long type variable where the number of the characters that are output from MMC function is set.
    When this function returns, the actual number of characters that are output to CNC will be set.

    This function returns EW_LENGTH if '*length'('length') has the value of zero or negative.

    data in

    The pointer of the area where NC part program to be output is stored.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    'RESET or STOP' was pushed.
    Call the cnc_dncend2 function.
    EW_FUNC cnc_dncstart2 function has not been executed.
    EW_LENGTH Data block length error
    The size of character string is negative.
    EW_BUFFER Buffer empty/full
    Retry because the buffer is full.
    EW_PARAM CNC parameter error
    the following CNC parameter must be set.
    Series 15/15i
    7713#0 = 1
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    8706#1 = 1
    EW_NOOPT No option
    The extended driver/library function is necessary.

    program\cnc_dncend

    Notifies the end of DNC operation to CNC.

    Execute this stopping command after the CNC's operation has been completed and reset.
    When this command is executed during CNC is operating, the function call waits until the end of operation and reset.

    Check "OP" signal(Series 15:F000#5, Series16/18/21, 16i/18i/21i,0i, Power Mate i:F000#7) to find whether CNC has been reset or not.
    When "OP" signal is "0", CNC is has been reset.


    There are cases where error(EW_DATA) during execution of downloading DNC program is returned by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dncend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_dncstart function has not been executed.
    EW_DATA Data error
  • A character which is unavailable for NC program is detected.
  • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
  • See 'Description' about the generation timing.

    program\cnc_dncend2

    Notifies the termination of outputting NC part program for DNC operation or M198 operation to the CNC.

    The application must call this function with the result indicating whether the output process of NC part program is terminated normally or not.

    In case that EW_RESET was returned by cnc_dnc2, this function must be called with specifying DNC_CANCEL as the result.

    This function is not available to Embedded Ethernet.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dncend2(unsigned short FlibHndl, short result);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    result in Specify the result indicating the result of outputting NC part program.
    DNC_NORMAL : normal termination
    DNC_CANCEL : aborted from CNC side
    DNC_OPENERR : open error of NC part program. In case of 30i, 0i-D/F and PMi-A at HSSB connection, the "SR5553" alarm occurs.
    DNC_NOFILE : file of NC part program not found. In case of 30i, 0i-D/F and PMi-A at HSSB connection, the "SR1079" alarm occurs.
    DNC_READERR : read from NC part program failed. In case of 30i, 0i-D/F and PMi-Aat HSSB connection, the "SR5554" alarm occurs.

    This function returns EW_DATA if other value is specified as the 'result'.


    ERRORS

    Code Description
    EW_FUNC cnc_dncstart2 function has not been executed.
    EW_DATA Data error
    The invalid value is specified as the 'result'.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    Following CNC parameter must be specified.
    Series 15/15i
    7713#0 = 1
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    8706#1 = 1

    program\cnc_dncstart

    It is possible to get CNC to run an NC program (NC command data),
    which is made by the application program, directly (DNC operation).
    The application program requests CNC to start DNC operation by this function.

    In case of Series 15, the parameter No.20 must be set to '15'.
    Even if this setting is not done, this function does not return error.
    In case of Series 16/18/21, 16i/18i/21i, 0i, Power Mate i, "DMMC" signal(DI) <G042#7>must be on.
    Even if this setting is not done, this function does not return error.

    Start the data transferring by using the cnc_dnc function or the cnc_cdnc function after executing this function and checking that the "STL" signal(DO) is on.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dncstart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
  • cnc_dncstart function has been executed.
  • Terminate DNC operation by using cnc_dncend function.

  • alarm in CNC side(Series 16/18/21, 16i/18i/21i, 0i, Power Mate i)
  • Reset the alarm on CNC.
    EW_PARAM CNC parameter error
    The following CNC parameter must be set.
    Series 16/18, 16i/18i/21i, 0i
    8706#1 = 0

    program\cnc_dncstart2

    This function returns whether DNC operation or M198 operation is being executed or not.

    This function returns EW_OK in case that DNC operation or M198 operation are started. If a return value is EW_OK at M198 operation, this function returns a program number/program name demanded from CNC, instead at DNC operation, NULL is returned for the program number/program name.
    Also, if a return value is EW_OK, it become possible to output the program of DNC operation or M198 operation by a function cnc_dnc2

    This function returns EW_REJECT in case that DNC operation or M198 operation has not been started.

    The following functions will return EW_FUNC in case that cnc_dncstart2 function is not executed.
    cnc_dnc2
    cnc_dncend2

    A basic procedure for DNC operation or M198 operation is shown below.

    This function is not available to Embedded Ethernet.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dncstart2(unsigned short FlibHndl, char *filename);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    filename out

    The pointer of the area where the NC program number/program name will be set by CNC.

    In order to get the program number for operation, at least 16 bytes area is required.
    Otherwise, the result of this function is not predictable.

    In order to get the program name for operation, at least 64 bytes area is required.
    Otherwise, the result of this function is not predictable.

    Program number/program name is set as ASCII code with NULL terminated at this area.

    <Example1> In case that 'O1234' was designated as the program number, the following character string is set to 'filename'.
    "O1234" + NULL
    <Example2> In case that 'GEAR_PARTS_001' was designated as the program name, the following character string is set to 'filename'.
    "GEAR_PARTS_001" + NULL

    The NULL string is set as the program number/program name in case of DNC operation, and the character string that shows the program number/program name in case of M198 operation.


    ERRORS

    Code Description
    EW_BUSY Busy
    cnc_dncstart2 function has been executed.
    Terminate DNC operation by using cnc_dncend2 function.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    The following CNC parameter must be set.
    Series 15/15i
    7713#0 = 1
    Series 16/18, 16i/18i/21i, 0i-A/B/C
    8706#1 = 1
    EW_REJECT DNC or M198 operation is not started.

    program\cnc_download

    Outputs NC program to be registered(downloading).

    When the data processing on the CNC side is delayed and the data cannot be transferred, this function waits until it can be transferred.
    If an application cannot wait, use the cnc_cdownload function.

    The procedure of downloading is as follows.

    For transferring the data, there are 4 buffers of 256 bytes.
    One buffer is used at each cnc_download calling without any relationto the data size.
    Therefore, the maximum size which can be transferred by one calling is 256 bytes.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed.
    Namely, an error status may refrect the result caused by the previously executed cnc_download callings.
    And the error status for some cnc_download callings just before the finish of downloading is returned by "End of downloading NC program".

    NC program format

    NC program to be registered to CNC is a string composed of ASCII characters as the following format.

    LF Oxxxx LF Block1 LF Block2 LF ... LF Mxx LF %

    where, LF 0x0A ('\n': EOB)
    Oxxxx Program number
    Mxx M code at the end of the program(M02,M30,etc.)

    'LF' must be placed at the top of the whole program, and '%' at the end.
    Data before the first 'LF' are ignored.
    Address 'O' and program number must be placed in the program to be registered.
    For example, to register a program such as

    O1234 ;
    G1 F0.3 W10. ;
    M30 ;
    %

    send a following string using cnc_download function.

    "\nO1234\nG1F0.3W10.\nM30\n%"

    The string data can be sent by multiple cnc_download callings.
    For above example, the program can be sent block by block like this.

    "\n"
    "O1234\n"
    "G1F0.3W10.\n"
    "M30\n"
    "%"

    And more, it is possible to send one block by multiple cnc_download callings.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_download(unsigned short FlibHndl,char *data, short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    data in

    Specify the top address of NC program data.

    number in

    Specify the number of characters of NC program data. (1 - 256)


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    CNC required to stop downloading.
    'RESET or STOP' was pushed.(Series 15/15i)
    Call the cnc_dwnend function.
    EW_FUNC cnc_dwnstart function has not been executed.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    EW_DATA Data error
  • The same program number has already been registered.
  • The same program number is selected on CNC.
  • A character which is unavailable for NC program is detected.
  • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
  • See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.

    program\cnc_download3

    Output NC data to be registered (downloading).

    This function outputs the characters of NC program as long as it is specified by '*length'.
    However, if there is no room to store the specified number of character, this function stores the characters as many as possible to fill the buffer and then sets '*length' with the real number of characters which are stored in the buffer.

    Data is transferred using 256 bytes buffer. To improve translation speed, the value of the '*length' should be a multiple of 256.

    (In case of Ethernet connection, the size of 1460 bytes(maximun value) can be transmitted at a time. So, specify the size in 1024-1400 bytes for a value of *length. If the buffer size is a little size, transmission efficiency become to worsen, and the communication error might occur.)

    In case that this function cannot output at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed. Namely, an error status may refrect the result caused by the previously executed cnc_download callings.
    And the error status for some cnc_download callings just before the finish of downloading is returned by cnc_dwnend3 function.


    NC data format

    NC data to be registered to CNC is a string composed of ASCII characters as the following format.

    LF Block1 LF Block2 LF ... LF %
    where LF = 0x0A ('\n')

    'LF' must be placed at the top of the whole program, and '%' at the end.
    Data before the first 'LF'are ignored.

    In case of NC program, address 'O' and program number must be placed in the program to be registered.
    For example, to register a program such as

            O1234 ;
            G1 F0.3 W10. ;
            M30 ;
            %
    

    send a following string using cnc_download3 function.

            "\nO1234\nG1F0.3W10.\nM30\n%"
    


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_download3(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the ponter of the variable to the character length of NC data.
    When this function returns, the actual number of characters that are output to CNC will be set.

    This function returns EW_LENGTH if '*length' has the value of zero or negative.

    data in

    Specify the ponter of the variable to NC data.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    CNC required to stop downloading.
    Call the cnc_dwnend3 function.
    EW_FUNC cnc_dwnstart3 function has not been executed.
    EW_LENGTH The size of character string is negative.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters (including 'LF' at the end of the block) is detected.
    3 : The registered program count is full.
    4 : The same program number has already been registered.
    5 : The same program number is selected on CNC.
    See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.
    EW_BUFFER Buffer full
    Retry because the buffer is full.
    See Description about the timing of error.
    EW_REJECT CNC execution denied (Series 15i)
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state (Series 15i)
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_download4

    Output NC data to be registered (downloading).

    This function outputs the characters of NC program as long as it is specified by '*length'.
    However, if there is no room to store the specified number of character, this function stores the characters as many as possible to fill the buffer and then sets '*length' with the real number of characters which are stored in the buffer.

    (In case of Ethernet connection, the size of 1460 bytes(maximun value) can be transmitted at a time. So, specify the size in 1024-1400 bytes for a value of *length. If the buffer size is a little size, transmission efficiency become to worsen, and the communication error might occur.)

    In case that this function cannot output at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed. Namely, an error status may refrect the result caused by the previously executed cnc_download4 callings.
    And the error status for some cnc_download4 callings just before the finish of downloading is returned by cnc_dwnend4 function.


    NC data format

    NC data to be registered to CNC is a string composed of ASCII characters as the following format.

    LF Block1 LF Block2 LF ... LF %
    where LF = 0x0A ('\n')

    'LF' must be placed at the top of the whole program, and '%' at the end.
    Data before the first 'LF'are ignored.

    In case of NC program, address 'O' and program number must be placed in the program to be registered.
    For example, to register a program such as

    O1234 ;
    G1 F0.3 W10. ;
    M30 ;
    %
    

    send a following string using cnc_download4 function.

    "\nO1234\nG1F0.3W10.\nM30\n%"
    


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_download4(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the ponter of the variable to the character length of NC data.
    When this function returns, the actual number of characters that are output to CNC will be set.

    This function returns EW_LENGTH if '*length' has the value of zero or negative.

    data in

    Specify the ponter of the variable to NC data.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    CNC required to stop downloading.
    Call the cnc_dwnend4 function.
    EW_FUNC cnc_dwnstart4 function has not been executed.
    EW_LENGTH The size of character string is zero or negative.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters (including 'LF' at the end of the block) is detected.
    3 : The registered program count is full.
    4 : The same program number has already been registered.
    5 : The same program number is selected on CNC.
    See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.
    EW_BUFFER Buffer full
    Retry because the buffer is full.
    See Description about the timing of error.
    EW_REJECT CNC execution denied
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_dwnend

    Notifies the end of downloading NC program to CNC.
    (This function must be executed after cnc_download / cnc_cdownload.)

    There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC program are returned by this function.
    Further, this function does not return until the registration of the output data by cnc_download(cnc_cdownload) is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_dwnstart function has not been executed.
    EW_DATA Data error
  • The same program number has already been registered.
  • The same program number is selected on CNC.
  • A character which is unavailable for NC program is detected.
  • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
  • See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.

    program\cnc_dwnend3

    Notifies the end of downloading NC data to CNC.
    (This function must be executed after cnc_download3.)

    There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC program are returned by this function.

    Further, this function does not return until the registration of the output data by cnc_download3 is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnend3(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_dwnstart3 function has not been executed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    3 : The registered program count is full.
    4 : The same program number has already been registered.
    5 : The same program number is selected on CNC.
    See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.
    EW_REJECT CNC execution denied (Series 15i)
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state (Series 15i)
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_dwnend4

    Notifies the end of downloading NC data to CNC.
    (This function must be executed after cnc_download4.)

    There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of downloading NC program are returned by this function.

    Further, this function does not return until the registration of the output data by cnc_download4 is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnend4(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_dwnstart4 function has not been executed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    3 : The registered program count is full.
    4 : The same program number has already been registered.
    5 : The same program number is selected on CNC.
    See Description about the timing of error.
    EW_PROT Write protected on CNC side
    Tape memory is write-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_OVRFLOW Memory overflow
    CNC tape memory shorts for the registration.
    Make enough free area in CNC memory.
    See Description about the timing of error.
    EW_REJECT CNC execution denied
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_dwnstart

    Requests CNC to start downloading NC program.
    (This function must be executed before cnc_download / cnc_cdownload.)
    In the case of Series 15/15i, when the CNC side is in background editprocessing, this function waits the termination of background edit.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnstart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy

    Series15/15i Series16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • cnc_dwnstart(cnc_vrfstart) function has been executed.
      Terminate a downloading(verifying) by using cnc_dwnend(cnc_vrfend) function.
    • background edit processing in CNC side
      Terminate background edit processing in CNC side.
    • alarm (PS000, PS101) on CNC side
      Reset the alarm on CNC.
    • MDI mode
      Change CNC mode to any mode except MDI.
    EW_FUNC Parameter(No.20,22:Input device) is wrong.(Series 15/15i)
    EW_PROT Write protected on CNC side
    • Protection KEY(DI) turns off.

    program\cnc_dwnstart3

    Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the Data window library.
    (This function must be executed before cnc_download3.)

    cnc_download3 function and cnc_dwnend3 function will return EW_FUNC in case that cnc_dwnstart3 function is not executed.

    A basic procedure for download is shown below.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnstart3(unsigned short FlibHndl, short type);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in
    0 : NC program
    1 : Tool offset data
    2 : Parameter
    3 : Pitch error compensation data
    4 : Custom macro variables
    5 : Work zero offset data
    18 : Rotary table dynamic fixture offset

    ERRORS

    Code Description
    EW_BUSY Busy

    Series 15i
    • cnc_dwnstart3(cnc_vrfstart) function has been executed.
    • Terminate a downloading (verifying) by using cnc_dwnend3(cnc_vrfend) function.

    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.

    Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    EW_ATTRIB Data attribute error
    Data type (type) is illegal.
    EW_NOOPT No option

    Series 15i
    • In case of custom macro variables or pitch error compensation data, this function needs the option for the target data.
    Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • In case of custom macro variables, work zero offset or pitch error compensation data, this function needs the option for the target data.
    EW_PARAM CNC parameter error

    Series 15i
    • Parameter (No.20,22:Input device) is wrong.
    Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • In case of parameter, set 'parameter write enable' state by setting screen.
    EW_MODE CNC mode error

    Series 15i (in case of except NC program)
    • In case of tool offset data and custom macro variables, change CNC mode to MDI or emergency state.
    • In case of parameter, pitch error compensation data and work zero offset data, change CNC mode to emergency state.
    Series16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i (in case of NC program)
    • MDI mode
    • Change CNC mode to any mode except MDI.

    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.
    EW_REJECT CNC execution denied (Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A)
    • CNC is machining
    • Cannot download while automatic operation is being executed on CNC in case of except NC program.
    EW_ALARM Alarm state (Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A)
    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    EW_PASSWD Specified CNC data cannot be written because the data is protected.
    (Series 16/18/21, 16i/18i/21i, 0i-A/B/C)

    program\cnc_dwnstart4

    Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the Data window library.
    (This function must be executed before cnc_download4.)

    In case of download for NC programs, a destination folder can be specified.

    cnc_download4 function and cnc_dwnend4 function will return EW_FUNC in case that cnc_dwnstart4 function is not executed.

    A basic procedure for download is shown below.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_dwnstart4(unsigned short FlibHndl,short type, char* dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kinf of the data.

    0 : NC program
    1 : Tool offset data
    2 : Parameter
    3 : Pitch error compensation data
    4 : Custom macro variables
    5 : Work zero offset data
    18 : Rotary table dynamic fixture offset
    dir_name in

    Specify a destination folder name for download. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.)
    When NULL is specified, a destination folder becomes a current folder.

    Example : "//CNC_MEM/USER/PATH1/"
    It is available when type = 0.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_BUSY Busy
    EW_ATTRIB Data attribute error
    Data type (type) is illegal.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program folder name is wromg.
    See Description about the timing of error.
    EW_NOOPT No option
    In case of custom macro variables or pitch error compensation data, this function needs the option for the target data.
    EW_PARAM CNC parameter error
    In case of parameter, set 'parameter write enable' state by setting screen.
    EW_REJECT CNC execution denied
    • CNC is machining
    • Cannot download while automatic operation is being executed on CNC in case of except NC program.
    EW_ALARM Alarm state
    • Alarm (PW000) on CNC side
    • Reset the alarm on CNC.

    program\cnc_exeprgname

    Reads full path name of the program which is being currently executed in CNC.
    When the CNC is stopping, the name of the executed program is acquired.
    The program name is stored in "execprg.name" with maximum 32 character string format.

  • In case of program of O number
  • exeprg.name : 'O' and the number are stored with ASCII code, for example, "O123".
    exeprg.o_num : The O number are stored with binary format, for example, 123.

  • In case of program of except O number
  • exeprg.name : The program name is stored with ASCII code, for example, "ABC".
    exeprg.o_num : 0 is stored with binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_exeprgname(unsigned short FlibHndl, ODBEXEPRG *exeprg);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    exeprg out

    Pointer to the ODBEXEPRG structure including the program name being executed.
    The ODBEXEPRG structure is as follows.

    typedef struct odbexeprg {
        char  name[36] ;   /* the program name being executed */
        long  o_num ;      /* the program number being executed */
    } ODBEXEPRG ;
    


    ERRORS

    Code Description

    program\cnc_exeprgname2

    Reads full path name of the program which is being currently executed in CNC.
    When the CNC is stopping, the name of the executed program is acquired.
    The program name is stored in "path_name" with maximum 256 character string format.

  • In case of program of O number
  • path_name : 'O' number is stored with ASCII code, for example, "//CNC_MEM/USER/PATH1/O123".

  • In case of program of except O number
  • path_name : The program name is stored with ASCII code, for example, "//CNC_MEM/USER/PATH1/ABC".

    When the CNC mode is MDI, "O0" is acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_exeprgname2(unsigned short FlibHndl, char *path_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    path_name out

    Specify the pointer to store the full path name of the program which is being currently selected in CNC.
    (The area of 256 bytes is necessary.)


    ERRORS

    Code Description
    EW_FUNC Not available.

    program\cnc_mergeprog

    This function inserts another program(dst_prog) in specified program(src_prog).

    The insertion position can select a specified line or the last line. This function cannot be used to MDI program.


    The program which becomes the CNC mode and an object which can be specified for the insertion destination is as follows.

    EDIT mode MDI mode Other mode
    MDI program ×(*1) ×(*1) ×(*1)
    Selected program O ×(*2) ×(*2)
    Not selected program O O O
    O : Available / × : Not available
    (*1) The return code is EW_DATA(Detail status is 1).
    (*2) The return code is EW_MODE.

    The program which becomes the CNC mode and an object which can be specified for the insertion source is as follows.

    EDIT mode MDI mode Other mode
    MDI program ×(*1) ×(*1) ×(*1)
    Selected program O O O
    Not selected program O O O
    O : Available / × : Not available
    (*1) The return code is EW_DATA(Detail status is 3).


    The program from the next data of program number to the previous data of EOR is inserted.

    The program is inserted from the top of specified line. When the last line is specified, the program is inserted just before EOR.



    PROTOTYPE

    FWLIBAPI short WINAPI cnc_mergeprog(unsigned short FlibHndl, short type, long src_prog, unsigned long line_no, long dst_prog);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the insert position of program.

    0 Specified line.
    1 Last line.
    src_prog in

    Specify the program number of insertion destination.

    line_no in

    Specify the line number by which the program is inserted. (1-)
    This argument is effective at type=0.
    When the line number which does not exist or "0" is specified, the return code is EW_DATA(detail status 2).

    dst_prog in

    Specify the program number of insertion source.


    ERRORS

    Code Description
    EW_BUSY Busy
    - Background edit processing in CNC side
    - MDI mode on CNC side
    EW_ATTRIB data attribute error
    Insert position(type) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Error except EW_DATA
    1 : The program number of insertion destination(dst_prog) is wrong.
    2 : The Line number(lone_no) is wrong. (does not exist line number or "0")
    3 : The program number of insertion source(src_prog) is wrong.
    4 : The same program number is specified.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection on CNC side
    CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding).
    EW_OVERFLOW Memory overflow
    It is lack of free area in CNC memory. Make enough free area in CNC memory.
    EW_MODE CNC mode error
    EW_REJECT CNC execution rejection
    - Program of the insertion destination is running.
    - Some alarm in CNC.

    program\cnc_pdf_add

    Creates the folder or file under the specified folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).
    The file having the same number or name against the current existing file cannot be created.
    The folder having the same name against the current existing folder cannot be created.
    And when the attribute of the folder is prohibited from writing, new folder/file cannot be created.
    When the making of file is executed on EDIT mode, the making file is automatically selected as the main program.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_add(unsigned short FlibHndl, char *file_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    In case of folder name, place "/" at the end of string. If there is no "/", it is regarded as the string for file.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Format for file/folder error
    2 : Specified folder cannot be found
    3 : Registered number of file is overflow
    4 : Same file name has been registered
    5 : Specified file/folder is selected on CNC side
    7 : The making of file to specified folder is prohibited by the template program function.
    8 : The making of folder to specified folder is prohibited by the template program function.
    9 : The prohibited program name(.TEMPL) by the template program function is included in the specified folder.
    EW_PROT Write protected
    Specified file/folder is prohibited from writing.
    EW_OVRFLOW Program memory overflow.
    Program registration area is full.
    EW_REJECT CNC execution rejected
    CNC is on execution.

    program\cnc_pdf_cond

    Rearranges the contents of the program. In other words, this function condenses the program.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).

    When the specified file is used for NC operation or selected at foreground, the file cannot be condensed. And in case of the protected file, the file cannot be condensed.

    When the file name is not specified, all files in the current folder are condensed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_cond(unsigned short FlibHndl, char *file_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    When the "NULL" string only is specified, all files in the current folder are condensed.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : File name format error
    2 : Specified file cannot be found.
    5 : Specified file is selected on CNC side
    EW_PROT Write protected
    Specified file/folder is prohibited from writing.
    EW_REJECT CNC execution rejected
    CNC is on execution.

    program\cnc_pdf_copy

    Copies the specified program.

    The program name is specified according to the following format.

    //Drive Name/Filder Name../Program Name

    The copy between different devices is also possible. The device which can be specified is as follows.

    Device Device name
    CNC Memory CNC_MEM
    Memory Card MEM_CARD
    Data Server DATA_SV

    The copy process cannot be executed at the following conditions:

    • Source program is protected by the attribute, Encryption, Prohibiting of Edit/display, Prohibiting of Edit, etc.
    • The protection level of the source file is set higher than the operation level by the 8-level data protection.
    • There is the same name file at the target directory.
    • The attribute of the target directory has Prohibiting of Edit.
    • The target device is "MEM_CARD".
    • Source program and target program is the same name.
    • Main program was specified to source file or target file.
    • Illegal device was specified.

    The copy of the directory cannot be done.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_copy(unsigned short FlibHndl, char *file_path, char *copy_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores the source program path in "drive + directory + file name" format.
    String length can be up to 242 characters. The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.

    copy_path in

    Specify the pointer for the string that stores the target program path in "drive + directory + file name" format.
    String length can be up to 242 characters. The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program/directory name format error
    2 : Specified directory cannot be found.
    3 : Registered number of program is overflow
    4 : Same program name has been registered(However, when the target program was main program, 5 is set to err_no.)
    Source file and target file is the same name.
    5 : Main program was specified to source file.
    Main program was specified to target file.
    7 : The program copy to specified folder is prohibited by the template program function.
    9 : The prohibited program name(.TEMPL) by the template program function is included in the specified folder.
    EW_PROT Write protected
    Specified file is prohibited from writing.
    Specified directory has the write protedted setting.
    Specified program is locked by cnc_setpdf_pglock.
    Writing to the device is prohibited by setting the parameter etc..
    EW_OVRFLOW Program memory overflow.
    Program registration area is full.
    EW_MODE CNC mode error
    EW_REJECT CNC execution rejected
    CNC is on execution.

    program\cnc_pdf_del

    Deletes the folder or file under the specified folder.
    Execution of this function is kept waiting when CNC is in editing including the background edit state).

    When the specified file is used for NC operation or selected at foreground, the file cannot be deleted. And in case of the protected file, the file cannot be deleted.

    When the specified folder is selected as the current folder, the folder cannot be deleted. And in case that the folder is not vacant, the folder cannot be deleted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_del(unsigned short FlibHndl, char *file_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    In case of folder name, place "/" at the end of string. If there is no "/", it is regarded as the string for file.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Format for file/folder error
    2 : Specified folder cannot be found
    5 : Specified file/folder is selected on CNC side, or, in case of folder deletion, the folder is not vacant
    9 : The prohibited program name(.TEMPL) by the template program function is included in the specified folder.
    EW_PROT Write protected
    Specified file/folder is prohibited from writing.
    EW_REJECT CNC execution rejected
    - CNC is on execution.
    - CNC is in the emergency stop.

    program\cnc_pdf_delall

    All programs in the specified folder are deleted.
    In the following cases, the program is not deleted.

    - Protected programs.
    - Background editing program.
    - Downloading, verifying.
    - Running program.
    - Main program in except EDIT mode.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_delall(unsigned short FlibHndl, unsigned short type, char *path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify "0".

    path in

    Specify the pointer for the string that stores "drive + folder name".
    String length can be up to 212 characters. The string must be NULL terminated.
    When the NULL was specified to path, it is assumed that the foreground folder was specified.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The path(path) is wrong.
    2 : The type(type) is wrong.

    program\cnc_pdf_delline

    Deletes the NC program by line basis.

    When you specify the line including a program file name(ex."Oxxxx" or "<xxxx>"), this function deletes the character after a file name, but doesn't delete a file name.

    Example)
    You have the following program you are going to delete by line basis.
    O1234(TEST  PROGRAM) ;
    G01 X0. F100 ;
    X20. ;
    M30 ;
    %
    
    When you delete 3 lines from the line number 0 for the above program, then you get the following result.
    O1234 M30 ;
    %
    

    The conditions of the function about CNC mode and the kind of program are as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    If you have the playback option, TJOG/THND mode is the same as EDIT.

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.


    When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).

    Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.

    Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_delline(unsigned short FlibHndl, char *prog_name, unsigned long line_no, unsigned long line_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name in

    Program path makes of the "drive name","path name" and "file name".
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the file name.
    If the value of "prog_name" is NULL, the previous progaram name is specifed.
    When you use this function for the MDI program , you have to be specifed the "MDI".

    line_no in

    Specify the line number to delete.
    When you delete the first line of a program, you have tospecify 0. When you specify other than the existing line number, you get EW_DATA error as the return code.

    line_len in

    Specify the line number to delete.
    If you set the value of "line_len" over the registed lines, it is deleted the lines from the specified line number to the preceding last line. The last line (%) is not deleted.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program name(prog_name) error
    2 : The start line number(line_no) error
    3 : The amount of lines(*line_len) error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding).
    EW_MODE CNC mode error
    EW_REJECT CNC execution denied
    - CNC is in the emergency stop.

    program\cnc_pdf_move

    Moves the specified program.

    The move process cannot be executed at the following conditions:

    • Source program is protected by the attribute, Encryption, Prohibiting of Edit/display, Prohibiting of Edit, etc.
    • The protection level of the source file is set higher than the operation level by the 8-level data protection.
    • There is the same name program at the target directory.
    • The attribute of the target directory has Prohibiting of Edit.
    • Target file has been selected at CNC side.
    • Source and target is the same program.
    • Illegal device was specified.

    The directory cannot be moved.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_move(unsigned short FlibHndl, char *file_path, char *move_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores the source program path in "drive + directory + file name" format.
    String length can be up to 242 characters. The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.

    move_path in

    Specify the pointer for the string that stores the target program path in "drive + directory + file name" format.
    String length can be up to 242 characters. The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program/directory name format error
    2 : Specified directory cannot be found.
    3 : Registered number of program is overflow
    4 : Same program name has been registered
    5 : Specified program is selected on CNC side
    6 : Source and target is the same program.
    7 : The program copy to specified folder is prohibited by the template program function.
    9 : The prohibited program name(.TEMPL) by the template program function is included in the specified folder.
    EW_PROT Write protected
    Specified file is prohibited from writing.
    Specified directory has the write protedted setting.
    Specified program is locked by cnc_setpdf_pglock.
    EW_OVRFLOW Program memory overflow.
    Program registration area is full.
    EW_MODE CNC mode error
    EW_REJECT CNC execution rejected
    CNC is on execution.

    program\cnc_pdf_rdactpt

    Get the actual execution pointer in MDI, MEM and EDIT, TJOG, THND mode.

    The restrictions are as follows.

    • When this function works in DNC/M198, the return code is EW_REJECT.
    • In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
    • In case of FS0i-D/F, FS30i-B and PMi-A, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
    • In case of FS0i-D/F, FS30i-B and PMi-A, even if M198 is executed, the return code is EW_OK.
    • When program is looked-ahead, It take next block number of block be looked-ahead.


    When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).

    Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.

    Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.


    In case of 0i-D, when this function is executed just behind the function(Ex.:cnc_pdf_searchresult) to which the block number is changed, the previous value might be acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_rdactpt(unsigned short FlibHndl, char* prog_name, long* blk_no );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name out

    Pointer to the variable to store the actual executed program into.
    It is "MDI" when MDI program is executed.

    blk_no out

    Pointer to the variable to store the actual executed program pointer into.
    It is a block number as the top of the program is 0.


    ERRORS

    Code Description
    EW_MODE CNC mode error
    CNC mode is except MDI, MEM, EDIT, TJOG and THND one.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_REJECT CNC execution denied
    • No program is executed.
    • CNC is in DNC/M198 operation.
    • STL signal is ON.
    • CNC is in the emergency stop.

    program\cnc_pdf_rdmain

    Reads the file information that is select currently as the main program.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_rdmain(unsigned short FlibHndl, char *file_path);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path out

    Specify the pointer for the string that stores "Current drive + folder + file name".
    Allocate 244 byte length for the string maximum size of 242 characters. The string is NULL terminated.


    ERRORS

    Code Description
    EW_REJECT CNC execution rejected

    program\cnc_pdf_rename

    Renames the folder or file under the specified folder.
    Execution of this function is kept waiting when CNC is in editing (including the background edit state).

    When the specified file is used for NC operation or selected at foreground, the file cannot be renamed. And in case of the protected file, the file cannot be renamed.

    When the specified folder is selected as the current folder or the upper folder that includes the current folder, the folder cannot be renamed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_rename(unsigned short FlibHndl, char *file_path, char *d_d_f) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    In case of folder name, place "/" at the end of string.
    If there is no "/", it is regarded as the string for file.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.

    d_d_f in

    Specify the pointer for the string that stores the folder/file name to be renamed.
    String length can be up to 33 characters. The string must be NULL terminated.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Format for file/folder error
    2 : Specified file/folder cannot be found
    4 : Same file name has been registered
    5 : Specified file/folder is selected on CNC side
    9 : The prohibited program name(.TEMPL) by the template program function is included in the specified folder.
    EW_PROT Write protected
    Specified file/folder is prohibited from writing.
    EW_REJECT CNC execution rejected
    - CNC is on execution.
    - CNC is in the emergency stop.

    program\cnc_pdf_searchresult

    Gets the result of cnc_pdf_searchword function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_searchresult(unsigned short FlibHndl, unsigned long *search_no );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    serach_no out

    Specify the pointer to the buffer holding the target string to search and line number to set.
    When the return value is EW_DATA, the line number of top or bottom is set.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_FUNC No execution on searching the string. (cnc_pdf_searchword)
    EW_DATA Data error
    Specified string cannot be found.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_NUMBER The line starting number search error

    program\cnc_pdf_searchword

    Searches the string within the NC program.

    The basic order to search is as follows.

    The conditions of the function about CNC mode and the kind of programare as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    The return value of this function and the position of the execution pointer change as follows by the existence of the playback option.
    Upper : With the playback option
    Lower : Withouit the playback option

    1) Search of the word in selected program (main program).

    Mode MEM MEM EDIT EDIT MDI JOG/HNDL Others
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK EW_OK EW_OK EW_OK EW_OK EW_REJECT
    EW_MODE EW_MODE EW_MODE EW_MODE
    Pointer movement of selected program None Moves Moves Moves Moves(*1) Moves None
    None None(*1) None
    Pointer movement in the executing screen None Moves Moves Moves Moves(*1) Moves None
    None None(*1) None
    (*1) The mode was switched from MDI to EDIT/MEM and the pointer position was confirmed.

    2) Search of the word in unselected program (not main program).

    Mode MEM MEM EDIT EDIT MDI JOG/HNDL Others
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Return value of cnc_pdf_searchword EW_OK EW_OK EW_OK EW_OK EW_OK EW_OK EW_OK
    Pointer movement of selected program None None None None None None None
    Pointer movement in the executing screen None None None None None None None

    3) Search of the word in MDI program.

    Mode MDI MDI MDI Others
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Idle mode
    (OP=0,STL=0)
    Idle mode
    (OP=0,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK EW_OK EW_MODE
    Pointer movement of selected program None None(*2) Moves None
    Moves
    Pointer movement in the executing screen None Moves Moves None
    None(*3)
    (*2) In cnc_pdf_rdactpt though it doesn't move, running is restarted from the block where the searched word exists.
    (*3) In the executing screen though it doesn't move, running is restarted from the block where the searched word exists.

    4) MEM running:Search of the word in main program during subprogram call(M98).

    Mode MEM MEM EDIT
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_OK EW_OK EW_OK
    Pointer movement of Main program
    (Execution position at returning from subprogram)
    None None None

    5) MEM running:Search of the word in main program during macro program call(G65).

    Mode MEM MEM EDIT
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_OK EW_OK EW_OK
    Pointer movement of Main program
    (Execution position at returning from macro program)
    None None None

    6) MEM running:Search of the word in main program during external subprogram call(M198).

    Mode MEM MEM EDIT
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_OK EW_OK EW_OK
    EW_MODE
    Pointer movement of Main program
    (Execution position at returning from external subprogram)
    None Moves(*4) Moves(*4)
    None
    (*4) It moves to the block where the searched word exists.

    7) MEM running:Search of the word in subprogram during subprogram call(M98).

    Mode MEM MEM EDIT
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK EW_OK
    EW_MODE
    Pointer movement of Sub program None Moves Moves
    None

    8) MEM running:Search of the word in macro program during macro program call(G65).

    Mode MEM MEM EDIT
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK EW_OK
    EW_MODE
    Pointer movement of Macro program None Moves Moves
    None

    9) MDI running:Search of the word in MDI program during subprogram call(M98).

    Mode MDI MDI
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_DATA(*5)
    Pointer movement of MDI program None Moves(*6)
    (*5) EW_DATA is the return value of cnc_pdf_cnc_pdf_searchresult(The return value of nc_pdf_searchword is EW_OK).
    (*6) It moves to the end block of the program of MDI.

    10) MDI running:Search of the word in MDI program during macro program call(G65).

    Mode MDI MDI
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_DATA(*7)
    Pointer movement of MDI program None Moves(*8)
    (*7) EW_DATA is the return value of cnc_pdf_cnc_pdf_searchresult(The return value of nc_pdf_searchword is EW_OK).
    (*8) It moves to the end block of the program of MDI.

    11) MDI running:Search of the word in MDI program during external subprogram call(M198).

    Mode MDI MDI
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK
    Pointer movement of MDI program None Moves(*9)
    (*9) It moves to the block where the searched word exists.

    12) MDI running:Search of the word in sub program during subprogram call(M98).

    Mode MDI MDI
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK
    Pointer movement of MDI program None None

    13) MDI running:Search of the word in macro program during macro program call(G65).

    Mode MDI MDI
    Operation status Auto run
    (OP=1,STL=1)
    Stop/Halt
    (OP=1,STL=0)
    Return value of cnc_pdf_searchword EW_REJECT EW_OK
    Pointer movement of MDI program None None


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_searchword(unsigned short FlibHndl, char *prog_name, unsigned long line_no, unsigned long search_type,unsigned long search_direct, unsigned long repeat, char* buffer );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name in

    Program path makes of the "drive name","path name" and "file name".
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the file name.
    If the value of "prog_name" is NULL, the previous progaram name is specifed.
    When you use this function for the MDI program , you have to be specifed the "MDI".

    line_no in

    Specify the line number to search from.
    When you search from the first line of a program, you have to specify 0.
    When you specify other than the existing line number, this function never returns error result as the return code.
    In this case, next cnc_pdf_searchresult function would return EW_NUMBER error.

    type in

    Specify the type of the search operation.

    0 : Character search (Search the one address character.)
    1 : Word search (Search the string by word basis.)
    2 : Last line search (Search the bottom of line)

    When you commands "Character search", you have to set the only one address character as the target string.
    If you set except the address character or more than two characters, this function returns EW_DATA error.

    When you commands "Word search" for the only one address character, you have no error and the address character is going to be searched.

    When you commands "Last line search", this function ignores the parameters direct, repeat and prog_data.

    direct in

    Specify the direction to search.

    0 : Search towards the top of the program.
    1 : Search towards the bottom of the program.

    repeat in

    Specify the limitation of times the string is found when there are many strings matching within the program.
    If you specify 0, this function returns EW_DATA error.

    prog_data in

    Specify the pointer to the buffer holding the target string to search.
    It is a NULL terminated ASCII string. The size of string, including NULL character, must be within 128. If it were more than 128, this function would return EW_DATA error.

    The first character of the string must be an address character (G, F, etc).
    You cannot search for the macro string or the characters in the macro string.
    After the address character, the next character must be a number, '+', '-' or '-'.
    If you use one of the following characters, you get EW_DATA error as the return code.

    • Except the available code for CNC
    • The small letter of alphabets
    • Address 'O' or the string consisted of 'O' + program number
    • '%'(EOR)


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program name(prog_name) error
    3 : The search type(search_type) error
    4 : The search direction(search_direct) error
    5 : The repeat count(repeat) error
    6 : The size of string error
    7 : The content of the string error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    EW_MODE CNC mode error
    EW_REJECT CNC execution denied
    - CNC is in the emergency stop.

    program\cnc_pdf_slctmain

    Selects the file under the specified folder as the main program.
    Execution of this function is kept waiting when CNC is in editing (including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_slctmain(unsigned short FlibHndl, char *file_path) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in

    Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerrfunction.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Format for file error
    2 : Specified file cannot be found
    EW_MODE CNC mode error

    program\cnc_pdf_wractpt

    Sets the execution pointer of the NC program for the MDI or Memory operation.

    If there are some blocks that CNC has already read, these blocks will be executed before the block specified by this function.


    When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).

    Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.

    Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_pdf_wractpt(unsigned short FlibHndl, char *prog_name, short type, long *blk_no );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name in

    Program name
    Specify the program name from "drive name + path name + file name".
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the file name.
    When you write the MDI program, you have to specify "MDI".

    type in

    Type of the execution pointer you will set.

    0 : Absolute pointer (The block number from the top of the program when the top is 0.)
    1 : Relative pointer (The relative value from the current execution pointer.)
    blk_no in/out

    Pointer to the long type variable holding the block number to set.

    In case of type = 0
    • Specify the block number from the top of the program when the top is 0.
    In case of type = 1
    • Specify the relative value from the current execution pointer.
    • When the specified block number is 0, the execution pointer is not changed and the actual absolute block number is stored into (*blk_no).
    The examples of the absolute pointer and relative one are as follows:
    Selected NC program Absolute Relative
    O1234; 0 -3
    G00 X0. Z0.; 1 -2
    G01 X10. Z5. F100.; 2 -1
    X20. Z15.; 3 0
    X35.; 4 1
    Z20; 5 2
    M30; 6 3
    % 7 4
    * In this case, the execution pointer is on the block having "X20. Z15.;".

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    type is illegal.
    EW_DATA Data error
    • The program number(prog_no) is not present.
    • The block number(*blk_no) is not present.
    EW_MODE CNC mode error
    • Except MDI and EDIT mode
    • prog_name is NULL in EDIT mode.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_REJECT CNC execution denied
    • CNC is machining right now.
    • MDI program is not present.
    • No program is selected.
    • Some alarm in CNC.
    • CNC is in the emergency stop.

    program\cnc_rdactpt

    Get the actual execution pointer in MDI, MEM and EDIT, TJOG, THND mode.

    When this function works in DNC/M198 and RISC operation, the return code is EW_REJECT.

    The restrictions in FS30i, FS0i-D/F and PMi-A are as follows.

    • When this function works in DNC/M198, the return code is always EW_REJECT.
    • In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
    • In case of FS0i-D/F, FS30i-B and PMi-A, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
    • In case of FS0i-D/F, FS30i-B and PMi-A, even if M198 is executed, the return code is EW_OK.
    • When program is looked-ahead, It take next block number of block be looked-ahead.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdactpt(unsigned short FlibHndl, long *prog_no, long *blk_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no out

    Pointer to the variable to store the actual executed program number into.
    It is -1 when MDI program is executed.

    blk_no out

    Pointer to the variable to store the actual executed program pointer into.
    It is a block number as the top of the program is 0.


    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    CNC mode is except MDI, MEM, EDIT, TJOG and THND one.
    EW_REJECT CNC execution denied
    • No program is executed.
    • CNC is in DNC/M198 or RISC operation.
    • STL signal is ON.(FS30i/31i/32i, 0i-D/F, PMi-A)
    • CNC is in the emergency stop.(FS30i/31i/32i, 0i-D/F, PMi-A)

    program\cnc_rdblkcount

    Reads the value of block counter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdblkcount(unsigned short FlibHndl, long *prog_bc);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    prog_bc out

    Specify the address of the variable where the block counter is stored.


    ERRORS

    Code Description
    EW_NOOPT No option
    The program restarting function and the extended driver/library function are necessary.

    program\cnc_rddncdgndt

    Diagnosis data regarding the output of downloading DNC program is returned.
    The purpose of this function is the maintenance of DNC operation or 198 operation.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rddncdgndt(unsigned short FlibHndl, ODBDNCDGN *dgndt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dgndt out

    The pointer to a structure 'ODBDNCDGN' that returns diagnosis data.
    The structure of ODBDNCDGN is as follows.

    typedef struct odbdncdgn {
            short          ctrl_word;
            short          can_word;
            char           nc_file[16];
            unsigned short read_ptr;
            unsigned short write_ptr;
            unsigned short empty_cnt;
            unsigned long  total_size;
    } ODBDNCDGN;
    
    ctrl_word
    Data that shows an operation demand from CNC is set.
    can_word
    Data that shows an operation stop demand from CNC is set.
    nc_file
    Program number/program name specified as an operation start demand is set.
    As for program name, 15 characters from the head are acquired.
    read_ptr
    Read pointer of buffer for DNC operation is set.
    write_ptr
    Write pointer of buffer for DNC operation is set.
    empty_cnt
    Number indicating how many times the read pointer caught up with the write pointer at outputting the NC part program is set.
    This count shows the total of the events from the power-up of CNC.
    total_size
    Total number of characters output as the NC part program after cnc_dncstart2 was executed is set.
    This value is cleared by each cnc_dncstart2 execution.

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error
    Following CNC parameter must be set.
    Series 15/15i
    7713#0 = 1
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C
    8706#1 = 1

    program\cnc_rdexecprog

    Reads the contents of NC program being executed on CNC.

    In case of 15, 0i-F, 30i and PMi-A, the acquired character string is a analyzed character string.

    If you want the acquisition of the analyzed character string on the FS0i-D, set parameter No.13104#2=1.


    Note) In 16/18/21, 0i, Power Mate i, and 15, 30i, PMi-A the single block operation is different as follows.

    In case of 16/18/21, 0i-A/B/C, Power Mate i:
    - The pointer moves to the next block, and stops after the block is executed.
    In case of 15, 30i, 0i-D/F, PMi-A:
    - The current block is executed, and stops after the pointer moves to the next block.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdexecprog(unsigned short FlibHndl, unsigned short *length, short *blknum, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the address of the variable which shows the number of characters to be read.
    Set the number of characters to be read to this variable *length(length).
    After reading, the number of characters actually read is set in this variable *length(length) again.

    blknum out

    Specify the address of the variable to store the number of blocks read in advance.

    data out

    Specify the top address of the string to store with the executing NC program.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Length of the block (length) is illegal.
    EW_NOOPT No option
    The extended driver/library function is necessary.

    program\cnc_rdexecpt

    When the CNC is MDI and MEM mode(In case of CNC is running), the program number and block number of the executed program is acquired. When the CNC is EDIT, TJOG and THND mode(In case of CNC is editing), the program number and block number of the preread data is acquired.

    The limitation of this function is as follows.

    1) CNC is in DNC/M198 operation.
    2) CNC is in RISC operation.
    3) The program number which is acquired by cnc_rdprgnum and this function is not same number.
    4) In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
    5) In case of FS0i-D/F, FS30i-B and PMi-A, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
    6) In case of FS0i-D/F, FS30i-B and PMi-A, even if M198 is executed, the return code is EW_OK.
    7) In case of FS30i, FS0i-D/F and PMi-A, the contents of "pact" and "pnext" is same. (the preread block cannot be acquired.)
    8) The pointer information acquired with FS16i/18i/21i and FS30i, FS0i-D/F, PMi-A might be different depending on the running mode(or status).
    The limitation of this function is as follows.

    1) CNC is in DNC/M198 operation.
    2) CNC is in RISC operation.
    3) The program number which is acquired by cnc_rdprgnum and this function is not same number.
    4) In case of FS30i-A, when STL signal is ON, the return code is EW_REJECT.
    5) In case of FS30i-B, even if STL signal is ON, the return code is EW_OK. (when Parameter No.13104#1=1, the return code is EW_REJECT)
    6) In case of FS30i-B, even if M198 is executed, the return code is EW_OK.
    7) The contents of "pact" and "pnext" is same. (the preread block cannot be acquired.)
    8) The pointer information acquired might be different depending on the running mode(or status).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdexecpt(unsigned short FlibHndl, PRGPNT *pact, PRGPNT *pnext);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pact out

    Specify the pointer to the PRGPNT structure to store the execution pointer.

    The PRGPNT structure is as follows.
    typedef struct _prgpnt {
        long    prog_no;
        long    blk_no;
    } PRGPNT;
    
    prog_no
    Program number
    When the MDI program is executed, -1 is set.

    blk_no
    Block number
    The block number by which the head of program is 0 is set.
    pnext out Specify the pointer to PRGPNT structure to store the preread block pointer. The PRGPNT structure is as shown in the above.

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    CNC mode is except MDI, MEM, EDIT, TJOG and THND one.
    EW_REJECT CNC execution denied
  • No program is executed.
  • STL signal is ON.(30i, 0i-D/F, PMi-A)
  • Emergency(30i, 0i-D/F, PMi-A)
  • CNC is in DNC/M198 operation.
  • CNC is in RISC operation.
  • program\cnc_rdmdipntr

    Reads the execution pointer information for MDI operating program.
    The content which can be acquired is the following items.

    • program number being executed
    • It is basically 0 for MDI operation.(In case of Series 16i/18i-W, it is -1.)
      When executing program is sub-program, the sub-program number is returned.

    • execution block pointer
    • Block pointer which is being currently executed in CNC.

    • preread program number
    • Program number read in advance.(displayed in green on the CNC screen)
      For MDI operating, it is basically 0, and for reading sub-program in advance, it is the number of sub-program.

    • preread block pointer
    • Last block pointer in the program read ahead.

    In Series 15/15i, it is invalid except 'preread block pointer'. (0 can be read at any time)
    In Series 16i/18i-W, 'preread program number' and 'preread block pointer' are invalid.
    In Series 30i, 0i-D/F and PMi-A 'program number being executed' and 'execution block pointer' are invalid.

    In Series 16/18, 16i/18i, 30i, Power Mate i, it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits.
    See Program number 8 digits for details.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmdipntr(unsigned short FlibHndl, ODBMDIP *mdip);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mdip out

    Pointer to the ODBMDIP structure including the execution pointer information.
    The ODBMDIP structure is as follows.

                            For program number 4 digits,
    typedef struct odbmdip {
         short  mdiprog;    /* Program number being executed. */
         long   mdipntr;    /* Execution block pointer. */
         short  crntprog;   /* Preread program number.  */
         long   crntpntr;   /* Preread block pointer. */
    } ODBMDIP ;
    
    For program number 8 digits,
    typedef struct odbmdip {
         long   mdiprog;    /* Program number being executed. */
         long   mdipntr;    /* Execution block pointer. */
         long   crntprog;   /* Preread program number.  */
         long   crntpntr;   /* Preread block pointer. */
    } ODBMDIP ;
    
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mdip out

    Pointer to the ODBMDIP structure including the execution pointer information.
    The ODBMDIP structure is as follows.

                            For program number 4 digits,
    typedef struct odbmdip {
         short  mdiprog;    /* Not used */
         long   mdipntr;    /* Not used */
         short  crntprog;   /* Preread program number */
         long   crntpntr;   /* Preread block pointer  */
    } ODBMDIP ;
    
    For program number 8 digits,
    typedef struct odbmdip {
         long   mdiprog;    /* Not used */
         long   mdipntr;    /* Not used */
         long   crntprog;   /* Preread program number */
         long   crntpntr;   /* Preread block pointer  */
    } ODBMDIP ;
    

    ERRORS

    Code Description
    EW_FUNC Unavailable (Series 15i,16/18, 16i/18i, Power Mate i)
    This application is not customized for the program number 8 digits.
    See Program number 8 digits for details.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    Set CNC mode to MDI.

    program\cnc_rdmdiprgstat

    The following information as a state of the MDI program is got.
    1) Existence of MDI program
    2) Execution start line of MDI program.

    Note) The execution start line of the MDI program changes as follows before and after the execution of the function concerning writing the MDI program or setting the pointer.
    cnc_wrmdiprog 1:From the top of program
    cnc_wrmdipntr 0:From the pointer of program (In case of 30i, 0i-D/F and PMi-A, immediately after the MDI program registration from initial state, the state become to "1:From the top of program".)
    cnc_wractpt The execution start line is maintained.

    * Even if the cnc_wractpt is executed when the state(bit2) of the execution start line is '1', the program is started from the top of program .
    If the cnc_wractpt is executed when the state(bit2) of the execution start line is '0', the program is started from line setted by cnc_wractpt.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmdiprgstat(unsigned short FlibHndl, unsigned short *status);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    status out

    Specify the pointer to the variable to store the state of MDIprogram.
    The state of MDI program is shown as follows.

    Existence of MDI program(bit0,1)
    The following value is got by bit 0 and 1.

      0: No program (30i, 0i-D/F and PMi-A have not this state.)
      1: Initial state (olny "O0000%")
      2: Already registered
    Execution start line on of MDI program(bit2).
    The execution start line of MDI program in the next execution is shown.
      1: From the top of program
      0: From the pointer of program


    ERRORS

    Code Description
    EW_MODE CNC mode error
    CNC mode is not MDI mode.

    program\cnc_rdpdf_alldir

    Reads the file information under the specified folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_alldir(unsigned short FlibHndl, short *num_prog, IDBPDFADIR *pdf_adir_in, ODBPDFADIR *pdf_adir_out);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    num_prog in/out
    in : Specify the maximum number of programs to be read.
    out : This function returns the number of programs that were actually read.
    pdf_adir_in in

    Specify the pointer of the IDBPDFADIR structure that stores the folder setting value.
    The IDBPDFADIR structure is as follows.

    typedef struct idbpdfadir {
        /* input */
        char        path[212];      /* Path name string */
        short       req_num;        /* Request entry number */
        short       size_kind;      /* Output size format */
        short       type;           /* Program list format */
        short       dummy;
    } IDBPDFADIR ;
    
    path
    Specify the string having "Drive name + folder name".
    The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.
    req_num
    Specify the index of subfolder information.
    The first subfolder index is 0, this data should be incremented 1 by 1.
    size_kind
    Specify the output format of program size.
    0 : Page
    1 : Byte
    2 : KByte(1KByte=1024Byte)
    3 : MByte(1MByte=1024kByte)
    type
    Specify the output format of program list
    0 : Size, comment, process time stamp are not acquired.
    1 : Size, comment, process time stamp are acquired.
    (Specifying 0 is more rapidly processed.)
    pdf_adir_out out

    Specify the pointer of ODBPDFADIR structure that stores the program file information under the folder.
    The ODBPDFADIR structure is as follows.

    typedef struct odbpdfadir {
        /* output */
        short       data_kind;      /* File data kind */
        short       year;           /* Last edited date (year) */
        short       mon;            /*                  (month) */
        short       day;            /*                  (day) */
        short       hour;           /* Last edited time (hour) */
        short       min;            /*                  (minute) */
        short       sec;            /*                  (second) */
        short       dummy;
        long        dummy2;
        long        size;           /* file size */
        unsigned long attr;         /* attribute */
        char        d_f[36];        /* name string */
        char        comment[52];    /* comment */
        char        o_time;[12]     /* process time stamp */
    } ODBPDFADIR ;
    
    data_kind
    Indicates the kind of this file data.
    0 : folder
    1 : file
    year
    Indicates the year part of the last edited date of the file.
    mon
    Indicates the month part of the last edited date of the file.
    day
    Indicates the day part of the last edited date of the file.
    hour
    Indicates the hour part of the last edited time of the file.
    min
    Indicates the minute part of the last edited time of the file.
    sec
    Indicates the second part of the last edited time of the file.

    Above date/time information is valid in case of "file" only.

    size
    File size (0..99999999)
    The data is valid in cas of "file" and "type = 1".
    attr
    Attribute of "file/folder", shown by bit switch.
    [attribute of folder]
    #0 : Editing 0:permitted 1:prohibited
    #1 : Editing/displaying 0:permitted 1:prohibited
    [attribute of file]
    #0 : Editing 0:permitted 1:prohibited
    #1 : Editing/displaying 0:permitted 1:prohibited
    #2 : Encryption 0:OFF 1:ON
    #3 : File type 0:Program file 1:Other data file
    #8..#10 : Modify protection level
    Numerical value 0..7 by #10-MSB, #8-LSB
    #12..#14 : Output protection level
    Numerical value 0..7 by #14-MSB, #12-LSB
    Other bits that are described above are reserved.
    d_f
    folder/File name string, NULL terminated.
    comment
    The "Comment" stored next to the "Program number" in the CNC is returned.
    The maximum length of the comment is 48 characters (50 characters including leading "(" and trailing ")").
    When the "Comment" is longer than 48 characters, the part after the 48th character is ignored. When no "Comment" is registered, only parentheses ("()") are returned.
    The "Comment" string is terminated with NULL character.
    The data is valid in cas of "file" and "type = 1".
    o_time
    The process time stamp ("xxxHxxMxxS" format comment) stored next to the "Program number" is returned.
    The string is NULL terminated. The data is valid in cas of "file" and "type = 1".
    This function returns the current folder/file state when called.
    At the application, modification to the subfolder(path of IDBPDFADIR), like creating more subfolder, file/deleting subfolder, file, should be avoided.

    ERRORS

    Code Description
    EW_BUSY Busy
    NC uses the current resource.
    EW_NUMBER Data number error
    Subfolder specified by (req_num) does not exist.
    EW_ATTRIB Data attribute error
    • output format of program size(size_kind) is invalid.
    • output format of program list(type) is invalid.
    EW_DATA Data error
    The format of folder name(path) is invalid.
    Specified folder is not found.
    EW_REJECT CNC execution rejected

    program\cnc_rdpdf_curdir

    Reads the information of current folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_curdir(unsigned short FlibHndl, short dir_kind, char *dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_kind in

    Specify the kind of current folder to be read.

    1 : Foreground
    2 : Background

    dir_name out

    Specify the pointer for the string that stores "Current drive + folder".
    Allocate 212 byte length for the string maximum size of 210 characters. The string is NULL terminated.


    ERRORS

    Code Description
    EW_ATTRIB data error
    The dir_kind is invalid.

    program\cnc_rdpdf_drive

    Reads the information of Program memory drive.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_drive(unsigned short FlibHndl, ODBPDFDRV *pdf_drv);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    pdf_drv out

    Specify the pointer of the ODBPDFDRV structure that stores the Program memory drive information.
    The ODBPDFDRV structure is as follows.

    typedef struct odbpdfdrv {
        short       max_num;        /* Number of drive */
        short       dummy;
        char        drive[16][12];  /* Drive name */
    } ODBPDFDRV;
    
    max_num
    Number of drive name that is returned this time.
    This number becomes up to 16.
    drive
    Drive name string.
    String of specified by max_num (drive[0]..drive[max_num-1]) is valid.
    Drive name string is up to 8 characters, NULL terminated.

    ERRORS

    Code Description

    program\cnc_rdpdf_inf

    Reads the information Program memory file on the specified drive.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_inf(unsigned short FlibHndl, char *drive, short size_kind, ODBPDFINF *pdf_inf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    drive in

    Specify the drive name string.
    Drive name string is up to 8 characters, NULL terminated.
    Drive name can be acquired by cnc_rdpdf_drive function.

    size_kind in

    Specify the data unit, used_page and all_page.

    0 : Page
    1 : Byte
    2 : KByte(1KByte=1024Byte)
    3 : MByte(1MByte=1024kByte)

    pdf_inf out

    Specify the pointer of the ODBPDFINF structure that stores the Program memory drive information.
    The ODBPDFINF structure is as follows.

    typedef struct odbpdfinf {
        long        used_page;      /* Used capacity */
        long        all_page;       /* Total capacity */
        long        used_dir;       /* Number of folders in use */
        long        all_dir;        /* Total number of folders */
    } ODBPDFINF;
    
    used_page
    Used capacity of the drive.
    all_page
    Total capacity of the drive.
    Unused program capacity is (all_page - used_page).
    used_dir
    Number of folders in use.
    all_dir
    Total number of folders.
    Unused folder number is (all_dir - used_dir).

    ERRORS

    Code Description
    EW_DATA data error
    The drive specified by (drive) does not exist.

    program\cnc_rdpdf_line

    Reads the NC program by line basis.

    This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted.
    And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.


    When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).

    Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.

    Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.

    Example)
    When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
    O1234 ;
    N001 G01 X0. F100 ;
    N002 X20. ;
    N003 X50. ;
    N004 X80. ;
    N005 M30 ;
    %
    

    The conditions of the function about CNC mode and the kind of program are as follows.

    MDI mode Other mode
    MDI program O ×
    Selected program O O
    Not selected program O O
    O: Available / ×: Not available (The return code is EW_MODE)

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.

    And alse by using cnc_setlibopt function, you can force the execution pointer not to be moved.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_line(unsigned short FlibHndl, char *prog_name, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name in

    Program path makes of the "drive name","path name" and "file name".
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the file name.
    If the value of "prog_name" is NULL, the previous progaram name is specifed.
    When you use this function for the MDI program , you have to be specifed the "MDI".

    line_no in

    Specify the line number to read from.
    When you read from the first line of a program, you have tospecify 0.
    When you specify other than the existing line number, you get EW_DATA error as the return code.

    prog_data out

    Specify the address to the buffer to read the program text.

    line_len in

    Specify the amount of lines to read.
    After calling this function, the actual read line count is set.

    data_len in

    Specify the size of character to read.
    After calling this function, the actual read character size is set.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program name(prog_name) error
    2 : The line number(line_no) error
    3 : The amount of lines(*line_len) error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    EW_MODE CNC mode error
    EW_REJECT CNC execution denied
    CNC is in the emergency stop.

    program\cnc_rdpdf_pglockstat

    The numbers of program and the program name is got which setted the protection of running/editing by cnc_setpdf_pglock.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_pglockstat(unsigned short FlibHndl,long *num_prog, ODBPRGNAME *prog_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    num_prog out

    Specify the pointer to the variable to store the number of program to which the protection of running/editing was setted.
    When there is no program to which the protection of running/editing was setted, 0 is set for this data.

    prog_name out

    Specify the pointer to the ODBPRGNAME structure that stores the program name to which protection of running/edit is set.
    The ODBPRGNAME structure is as follows.

    typedef struct odbprgname {
        char    name[MAX_LOCK_PROG][256];
    } ODBPRGNAME;
    
    When the program which sets the protection of running/editing does not exist, this data is invalid.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    program\cnc_rdpdf_subdir

    Reads the information of subfolder under the specified folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_subdir(unsigned short FlibHndl, short *num_dir, IDBPDFSDIR *pdf_sdir_in, ODBPDFSDIR *pdf_sdir_out);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    num_dir in/out
    in : Specify the maximum number of folders to be read.
    out : This function returns the number of folders that were actually read.
    pdf_sdir_in in

    Specify the pointer of the IDBPDFSDIR structure that stores the folder setting value.
    The IDBPDFSDIR structure is as follows.

    typedef struct idbpdfsdir {
        /* input */
        char        path[212];      /* Path name string */
        short       req_num;        /* Request entry number */
        short       dummy;
    } IDBPDFSDIR ;
    
    path
    Specify the string having "Drive name + folder name".
    The string must be NULL terminated.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.
    req_num
    Specify the index of subfolder information.
    The first subfolder index is 0, this data should be incremented 1 by 1.
    pdf_sdir_out out

    Specify the pointer of the ODBPDFSDIR structure.
    The ODBPDFSDIR structure is as follows.

    typedef struct odbpdfsdir {
        /* output */
        short       sub_exist;      /* existence of subfolder */
        short       dummy;
        char        d_f[36];        /* folder name */
    } ODBPDFSDIR ;
    
    sub_exist
    Indicates if file or subfolder exists under the subfolder which was acquired.
    bit 0 : subfolders exists
    bit 1 : file exists
    bit 2-15 : not used
    d_f
    Subfolder name string, NULL terminated.
    This function returns the current subfolder state when called.
    At the application, modification to the subfolder(path of IDBPDFSDIR), like creating more subfolder/deleting subfolder, should be avoided.

    ERRORS

    Code Description
    EW_BUSY Busy
    NC uses the current resource.

    program\cnc_rdpdf_subdirn

    Reads the number of subfolders/files under the specified folder.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpdf_subdirn(unsigned short FlibHndl, char *dir_name, ODBPDFNFIL *pdf_nfil);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_name in

    Specify the pointer for the string that stores "Current drive + folder".
    Allocate 212 byte length for the string maximum size of 210 characters. The string must be NULL terminated.

    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.
    pdf_nfil out

    Specify the pointer to the ODBPDFNFIL structure that stores the number of folders/files.
    The ODBPDFNFIL structure is as follows.

    typedef struct odbpdfnfil {
        /* input */
        short       dir_num;        /* number of folders */
        short       file_num;       /* number of files */
    } ODBPDFNFIL ;
    

    ERRORS

    Code Description
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : File name format error
    2 : Specified file cannot be found.
    EW_REJECT CNC execution rejected

    program\cnc_rdpglockstat

    The numbers of program and the program number is got which setted the protection of running/editing by cnc_setpglock.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpglockstat(unsigned short FlibHndl,long *num_prog, long *prog_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    num_prog out

    Specify the pointer to the variable to store the number of program to which the protection of running/editing was setted.
    Set the 4 to num_prog at this function calling. After the execution of this function, the number of program to which the running/editing is protected is set.
    When there is no program to which the protection of running/editing was setted, 0 is set for this data.

    prog_no out

    Specify the pointer to the variable to store the program number to which the protection of running/editing was setted.
    Prepare the array defined by the variable of 4 or more for this data because the protection of the running/editing can be set up to 4.
    When the program which setted the protection of running/editing does not exist, this data is no setted.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_LENGTH Data number error
    The value of less than four was specified for number of programs(num_prog).
    EW_NOOPT no option
    The extended driver/library function is necessary.

    program\cnc_rdprgdirtime

    Reads specified number of "Program Number","Comment" and "Processing time" data of the registered programs in the CNC, starting from the program with the specified Program number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprgdirtime(unsigned short FlibHndl, long *top_prog, short *num_prog, PRGDIRTM *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    top_prog in / out

    Pointer to the starting program number.
    The program number of the first program actually read is stored after this function call.

    num_prog in / out

    Pointer to the number of programs to be read.
    Actual number of programs being read is stored after this function call.
    When no programs are registered or no programs match the specified condition, 0" is returned.
    Valid number range is from 1 to 963.

    buf out

    Pointer to the PRGDIRTM structure where program directory data are returned.
    The PRGDIRTM structure is as follows.

    typedef struct prgdirtm {
            long    prg_no;
            char    comment[51];
            char    cuttime[13];
    } PRGDIRTM;
    
    prg_no
    Program number
    Program number is returned.
    comment
    Comment
    The "Comment" stored next to the "Program number" in the CNC is returned.
    The maximum length of the comment stored is 48 characters (50 characters includ- ing leading "(" and trailing ")").
    When the "Comment" is longer than 48 characters, the part after the 48th character is ignored. When no "Comment" is registered only parentheses ("()") are returned.
    The "Comment" character string is terminated with NULL character.
    cuttime
    Processing time
    The "Processing time" measured by the "Processing time stamp function" is returned.
    The maximum length of the "Processing time" data is 10 characters ( 12 characters including leading and trailing parentheses ).
    The character string is terminated with NULL character.
    Format : (hhhHmmMssS)+NULL (3 digits+H, 2 digits+M, 2 digits+S)
    In the following cases, only parentheses ("()+NULL") are returned.
    1. When no "Processing time" data exists.
    2. When "Comment" of the program is longer than 48 characters.
    3. When the format of the "Processing time" data is changed on the CNC side to the format other than "hhhHmmMssS".
    When there are more than two "Processing time" data, the first "Processing time" data is returned.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of readout(num_prog) is wrong.
    EW_NUMBER Data number error
    The start number of program(top_prog) is wrong.
    EW_NOOPT No option
    The machining time stamp option and the extended driver/library function are necessary.

    program\cnc_rdprgnum

    Reads program number(modal O number) of the program which is being currently selected in CNC.

    As for Series 15i, 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A, if CNC exetues the sub-program, this function can read also the main program number. In this case, that main program number is the root program number which was selected on the CNC for the execution. If the program being executed is not a sub-program, the same program number is set to both 'Running program number' and 'Main program number'.

    This function is used for management of NC programs in CNC by the application program, etc.

    The program numbers are stored in "buf.data" and 'buf.mdata" with unsigned binary format.

    In Series 16/18, 16i/18i, 0i-F, 30i, Power mate i, it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits.
    In Series 15i, it is necessary to switch API to the one for the program number 8 digits. See Program number 8 digits for details.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprgnum(unsigned short FlibHndl, ODBPRO *prgnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prgnum out

    Pointer to the ODBPRO structure including the program numbe being executed.
    The ODBPRO structure is as follows.

                            For program number 4 digits,
    typedef struct odbpro {
         short  dummy[2] ;   /* Not used. */
         short  data ;       /* Running program number. */
         short  mdata ;      /* Main program number.    */
    } ODBPRO ;               /*                         */
    
    For program number 8 digits,
    typedef struct odbpro {
         short  dummy[2] ;   /* Not used */
         long   data ;       /* Running program number. */
         long   mdata ;      /* Main program number.    */
    } ODBPRO ;               /*                         */
    

    ERRORS

    Code Description
    EW_FUNC Unavailable (Series 15i,16/18,16i/18i, Power Mate i)
    This application is not customized for the program number 8 digits.
    See Program number 8 digits for details.
    EW_PARAM CNC parameter error (Only Series 15)
    7613#0=0 when CNC is turned on.
    Set CNC parameter again.

    program\cnc_rdproctime

    Reads processing time stamp data of CNC programs measured by the CNC.
    When no processing time stamp data is available, 0 is returned in the element "nNum" of the user define type ODBPTIME.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdproctime(unsigned short FlibHndl, ODBPTIME *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    buf out

    Pointer to the ODBPTIME structure where returned data are stored.
    The ODBPTIME structure is as follows.

    typedef struct odbptime {
            short   num;
            struct{
                    long    prg_no;
                    short   hour;
                    char    minute;
                    char    second;
            }data[10];
    } ODBPTIME;
    
    num
    The number of processing time stamp data.
    The number of measured processing time stamp data is returned.
    Valid range : 0 to 10
    prg_no
    Program number
    Valid range: 1 to 9999
    (Valid range: 1 to 99999999 for program number 8 digits)
    hour
    Hour part of the processing time stamp data.
    Valid range: 0 to 999
    minute
    Minute part of the processing time stamp data.
    Valid range: 0 to 59
    second
    Second part of the processing time stamp data.
    Valid range: 0 to 59

    ERRORS

    Code Description
    EW_NOOPT No option
    The machining time stamp option and the coextended driver/library function are necessary.

    program\cnc_rdprogdir

    Reads the list of program numbers (program directory) of all NC programs registered in CNC.

    Program numbers, comments and character numbers of programs included in specified program number range are read with ASCII string format.
    Specify the start program number to be read in "datano_s" and the end one in "datano_e".
    Store "datano_s=1" and "datano_e"=9999 to read all programs.

    As for type=1 in series 15/15i, the range specification is invalid and all programs are always read.

    In Series 16/18, 16i/18i, Power Mate i, it is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits.
    In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
    See Program number 8 digits for details.


    Format of input data

    The program directory list which is read from CNC is the string composed of ASCII characters as the following format.

      type=0 Oxxxx Oxxxx ... %

      type=1 % LF Oxxxx (COMMENT) LF Oxxxx (COMMENT) LF ... LF %

      type=2 Oxxxx (COMMENT) CHAR_NUMBER Oxxxx (COMMENT) CHAR_NUMBER ... %

      where,
      LF 0x0A ('\n': EOB)
      Oxxxx Program number.
      This is an ASCII string without the leading '0' at numeric part, and sorted in numeric order. ("O1" - "O9999")
      CHAR_NUMBER Character number of the program.
      This is an ASCII string without the leading '0'. The number is raised to 80-character unit.
      COMMENT The comment which is written just after the program number is stored.
      The maximum character number of the comment body is 48. (50 including the before and the behind parentheses.) Only beginning 48 characters are stored for the comment in case that the length of the comment is longer than 48 characters. If the program has no comment, only parentheses ("()") are stored.

      For all cases, when no program is registered or there is no program in the specified range, only '%' is stored.
      A null character('\0') is not added at the end of each strings stored in the buffer.

      For example, when the next programs are registered in CNC, the result of this function, in case that datano_s=1 and datano_e=9999, is as follows.
      Program number (COMMENT) Character number
      O0012 (TEST) ; 420
      O0200 (WORK1); 352
      O0201 ; 537
      O9001 (SUB-PRO1) ; 781

      type Contents to be read
      0 "O12O200O201O9001%"
      1 "%\nO12(TEST)\nO200(WORK1)\nO201()\nO9001(SUB-PRO1)\n%"
      2 "O12(TEST)420O200(WORK1)352O201()537O9001(SUB-PRO1)781%"

      If the buffer size is not enough for the specified programs, the buffer is filled up to the specified size.
      In case of 15 bytes, the result is as follows.
      type Contents to be read
      0 "O12O200O201O900"
      1 "%\nO12(TEST)\nO20"
      2 "O12(TEST)420O20"


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogdir(unsigned short FlibHndl,short type, short datano_s,short datano_e,unsigned short length, PRGDIR *prgdir);For the program number 8 digits : FWLIBAPI short WINAPI cnc_rdprogdir(unsigned short FlibHndl,short type, long datano_s,long datano_e,unsigned short length, PRGDIR *prgdir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    type in Specify the form of the read program list.
    0 : only the program number
    1 : program number and comment
    2 : program number, comment, and number of use characters.
    datano_s in

    Specify the start program number.

    datano_e in

    Specify the end program number.

    length in

    Specify the length of a block(buffer size).

    prgdir out

    Pointer to the PRGDIR structure including program directory.
    The PRGDIR structure is as follows.

    typedef struct prgdir {
        char    prg_data[MAX_PBUF] ;   /* Directory data. */
    } PRGDIR ;                      (MAX_PBUF : maximum character number to read)
    

    ERRORS

    Code Description
    EW_FUNC Unavailable (Series 15i,16/18, 16i/18i, Power Mate i)
    This application is not customized for the program number 8 digits.
    See Program number 8 digits for details.
    EW_LENGTH Data block length error
    Length of the block (length) is illegal.
    EW_NUMBER Data number error
    Start program number (datano_s) or end program number (datano_e) is illegal.
    EW_ATTRIB Data attribute error
    Output format(type) is illegal.

    program\cnc_rdprogdir2

    Reads the program directory of all the programs registered in the CNC.

    Reads specified number of "Program Number","Comment" and "Program size (number of characters)" data of the registered programs in the CNC, starting from the program with the specified Program number.

    It has the function to specify the number of programs to be read in order to get the information corresponding to the number of programs which is set by the application.

    It is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits. See Program number 8 digits for details.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogdir2(unsigned short FlibHndl, short type, short *top_prog, short *num_prog, PRGDIR2 *buf);For the program number 8 digits : FWLIBAPI short WINAPI cnc_rdprogdir2(unsigned short FlibHndl, short type, long *top_prog, short *num_prog, PRGDIR2 *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of the program directory to read.
    0 : "Program number" only
    1 : "Program number" and "Comment"
    2 : "Program number", "Comment" and "Program size"
    top_prog in / out

    Pointer to the starting program number.
    The program number of the first program actually read is stored after this function call.

    num_prog in / out

    Pointer to the number of programs to be read.
    Actual number of programs being read is stored after this function call.

    buf out

    Pointer to the PRGDIR2 structure where program directory data are returned.
    The PRGDIR2 structure is as follows.

                            For program number 4 digits,
    typedef struct prgdir2 {
            short   number;
            long    length;
            char    comment[51];
            char    dummy;
    } PRGDIR2;
    
    For program number 8 digits,
    typedef struct prgdir2 {
            long    number;
            long    length;
            char    comment[51];
            char    dummy;
    } PRGDIR2;
    
    number
    Program number
    Program number is returned.
    length
    Program size
    Program size is returned.
    Valid when 2 is specified for the arguments "type".
    comment
    Comment
    The "Comment" stored next to the "Program number" in the CNC is returned.
    The maximum length of the comment stored is 48 characters (50 characters includ- ing leading "(" and trailing ")"). When the "Comment" is longer than 48 characters, the part after the 48th character is ignored.
    When no "Comment" is registered only parentheses ("()") are returned.
    The "Comment" character string is terminated with NULL character.
    Valid when 1 or 2 is specified for the argument "type".

    When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog".


    ERRORS

    Code Description
    EW_FUNC Unavailable (Series 15i,16/18, 16i/18i, 0i-F, 30i, Power Mate i)
    This application is not customized for the program number 8 digits.
    See Program number 8 digits for details.
    EW_LENGTH Data block length error
    The number of readout(num_prog) is wrong.
    EW_NUMBER Data number error
    The start number of program(top_prog) is wrong.
    EW_ATTRIB Data attribute error
    Output format(type) is wrong.

    program\cnc_rdprogdir3

    Reads the program directory of all the programs registered in the CNC.

    Reads "Program Number", "Comment", "Date (created and modified)" and Program size" data of which the specified amount of programs are registered programs in the CNC, starting from the program with the specified Program number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogdir3(unsigned short FlibHndl, short type, long *top_prog, short *num_prog, PRGDIR3 *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in
    0 : "Program number" only
    1 : "Program number" and "Comment"
    2 : "Program number", "Comment", "Date" and "Program size"
    top_prog in / out

    Pointer to the starting program number.
    The program number of the first program actually read is stored after this function call.

    num_prog in / out

    Pointer to the number of programs to be read.
    Actual number of programs being read is stored after this function call.

    buf out

    Pointer to the PRGDIR3 structure where program directory data are returned.
    The PRGDIR3 structure is as follows.

    typedef struct prgdir3 {
            long    number;
            long    length;
            long    page;
            char    comment[52];
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } mdate;
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } cdate;
    } PRGDIR3;
    
    number
    Program number
    Program number is returned.
    length
    Program size (number of characters)
    Program size is returned by character unit.
    Valid when 2 is specified for the arguments "type".
    page
    Program size (number of pages)
    (16i/18i-W only)
    Program size is returned by page unit.
    Valid when 2 is specified for the arguments "type".
    comment
    Comment
    The "Comment" stored next to the "Program number" in the CNC is returned.
    The maximum length of the comment stored is 48 characters (50 characters including leading "("; and trailing ")" ). When the "Comment" is longer than 48 characters, the part after the 48th character is ignored. When no "Comment" is registered only parentheses ( "()" ) are returned.
    The "Comment" character string is terminated with NULL character.
    Valid when 1 or 2 is specified for the argument "type".
    mdate
    Modified date (Invaid for Series 15i)
    Modified date is returned.
    Valid when 2 is specified for the argument "type".
    The meaning of structure is as follows.
    year : Year
    month : Month
    day : Day
    hour : Hour (Invaid for 16i/18i-W)
    minute : Minute (Invaid for 16i/18i-W)
    cdate
    Created date (16i/18i-W only)
    Created date is returned.
    Valid when 2 is specified for the arguments "type".
    The meaning of structure is equal to mdate.

    When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog".

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in Specify the type of the program directory to read.
    0 : "Program number" only
    1 : "Program number" and "Comment"
    2 : "Program number", "Comment", "Date" and "Program size"
    top_prog in / out

    Pointer to the starting program number.
    The program number of the first program actually read is stored after this function call.

    num_prog in / out

    Pointer to the number of programs to be read. Actual number of programs being read is stored after this function call.

    buf out

    Pointer to the PRGDIR3 structure where program directory data are returned.
    The PRGDIR3 structure is as follows.

    typedef struct prgdir3 {
            long    number;
            long    length;
            long    page;
            char    comment[52];
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } mdate;
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } cdate;
    } PRGDIR3;
    
    number
    Program number
    Program number is returned.
    length
    Program size (number of characters)
    Program size is returned by character unit.
    Valid when 2 is specified for the arguments "type".
    page
    unused
    comment
    Comment
    The "Comment" stored next to the "Program number" in the CNC is returned. The maximum length of the comment stored is 48 characters (50 characters including leading "(" and trailing ")"). When the "Comment" is longer than 48 characters, the part after the 48th character is ignored. When no "Comment" is registered only parentheses ("()") are returned.
    The "Comment" character string is terminated with NULL character.
    Valid when 1 or 2 is specified for the argument "type".
    mdate
    Modified date
    Modified date is returned.
    Valid when 2 is specified for the arguments "type".
    The meaning of structure is as follows.
    year : Year
    month : Month
    day : Day
    hour : Hour
    minute : Minute
    cdate
    unused

    When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog".


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of readout (num_prog) is wrong.
    EW_NUMBER Data number error
    The start number of program (top_prog) is wrong.
    EW_ATTRIB Data attribute error
    Output format (type) is wrong.

    program\cnc_rdprogdir4

    Reads the program directory of all the programs registered in the CNC.
    Reads "Program Number", "Comment", "Date (created and modified)" and "Program size" data of which the specified number of programs are registered programs in the CNC, starting from the program with the specified number(from the first program).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogdir4(unsigned short FlibHndl, short type, long top_number, short *num_prog, PRGDIR4 *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    type in Specify the type of the program directory to read.
    0 : "Program number" only
    1 : "Program number" and "Comment"
    2 : "Program number", "Comment", "Date" and "Program size"
    top_number in

    Specified the program number from the head to want to acquire program information.(1-)
    The program is acquired in ascending order.

    num_prog in / out

    Pointer to the number of programs to be read. Actual number of programs being read is stored after this function call.

    buf out

    Pointer to the PRGDIR4 structure where program directory data are returned.
    The PRGDIR4 structure is as follows.
    PRGDIR4 structure is same as PRGDIR3.

    typedef struct prgdir4 {
            long    number;
            long    length;
            long    page;
            char    comment[52];
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } mdate;
            struct{
                    short   year;
                    short   month;
                    short   day;
                    short   hour;
                    short   minute;
                    short   dummy;
            } cdate;
    } PRGDIR4;
    
    number
    Program number
    Program number is returned.
    length
    Program size (number of characters)
    Program size is returned by character unit.
    Valid when 2 is specified for the arguments "type".
    page
    unused
    comment
    Comment
    The "Comment" stored next to the "Program number" in the CNC is returned.
    The maximum length of the comment stored is 48 characters (50 characters including leading "(" and trailing ")").
    When the "Comment" is longer than 48 characters, the part after the 48th character is ignored.
    When no "Comment" is registered only parentheses ("()") are returned.
    The "Comment" character string is terminated with NULL character.
    Valid when 1 or 2 is specified for the argument "type".
    mdate
    Modified date
    Modified date is returned.
    Valid when 2 is specified for the arguments "type".
    The meaning of structure is as follows.
    year : Year
    month : Month
    day : Day
    hour : Hour
    minute : Minute
    cdate
    unused

    When no programs are registered or no programs match the specified condition, "0" is returned to "num_prog".


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of readout (num_prog) is wrong.
    EW_NUMBER Data number error
    The start number of program (top_number) is wrong.
    EW_ATTRIB Data attribute error
    Output format (type) is wrong.

    program\cnc_rdproginfo

    Reads the management data of NC programs already registered in CNC.

    The management data of NC program are

    • Number of registered programs(In case of 0i-F, 30i, the number of the reserved folders by system are added.)
    • Number of available programs
    • Character number of used memory
    • Character number of unused memory
    This function returns these data with binary format or ASCII string format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdproginfo(unsigned short FlibHndl, short type, short length, ODBNC *prginfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the output format.

    0 : binary
    1 : ASCII
    length in

    Specify the length of data block.

      12 : binary
      31 : ASCII
    prginfo out

    prginfo Pointer to the ODBNC structure including the program directory.
    The ODBNC structure is as follows.

    typedef struct odbnc {
         union {
            struct {
                 short   reg_prg ;   /* Number of registered programs. */
                 short   unreg_prg ; /* Number of available programs. */
                 long    used_mem ;  /* Character number of used memory. */
                 long    unused_mem ;/* Character number of unused memory. */
            } bin ;
            char asc[31] ;           /* Buffer for ASCII format */
         } u ;
    } ODBNC ;
    
    type=0
    Each data are stored in each members of the structure with binary format.

    prginfo.bin.reg_prg Number of registered programs.
    prginfo.bin.unreg_prg Number of available programs.
    prginfo.bin.used_mem Character number of used memory.
    prginfo.bin.unused_mem Character number of unused memory.
    type=1
    ASCII strings are stored in "prginfo.u.asc" with following format.

    % LF d1 LF d2 LF d3 LF d4 LF %
    LF 0x0A ('\n')
    d1 Number of registered programs
    d2 Number of available programs
    d3 Character number of used memory
    d4 Character number of unused memory
    d1 - d4 are ASCII strings without the leading '0'.
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the output format.

    0 : binary
    1 : ASCII
    length in

    Specify the length of data block.

      12 : binary
      31 : ASCII
    prginfo out

    prginfo Pointer to the ODBNC structure including the program directory.
    The ODBNC structure is as follows.

    typedef struct odbnc {
         union {
            struct {
                 short   reg_prg ;   /* Number of registered programs. */
                 short   unreg_prg ; /* Number of available programs. */
                 long    used_mem ;  /* Character number of used memory. */
                 long    unused_mem ;/* Character number of unused memory. */
            } bin ;
            char asc[31] ;           /* Buffer for ASCII format */
         } u ;
    } ODBNC ;
    
    type=0
    Each data are stored in each members of the structure with binary format.

    prginfo.bin.reg_prg Number of registered programs.
    prginfo.bin.unreg_prg Number of available programs.
    prginfo.bin.used_mem Character number of used memory.
    prginfo.bin.unused_mem Character number of unused memory.
    type=1
    ASCII strings are stored in "prginfo.u.asc" with following format.

    % LF d1 LF d2 LF d3 LF d4 LF %
    LF 0x0A ('\n')
    d1 Number of registered programs
    d2 Number of available programs
    d3 Character number of used memory
    d4 Character number of unused memory
    d1 - d4 are ASCII strings without the leading '0'.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Length of the block (length) is illegal.
    EW_ATTRIB Data attribute error
    Output format (type) is illegal.

    program\cnc_rdprogline

    Reads the NC program by line basis.

    This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted.
    And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.

    Example)
    When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
    O1234 ;
    N001 G01 X0. F100 ;
    N002 X20. ;
    N003 X50. ;
    N004 X80. ;
    N005 M30 ;
    %
    

    The conditions of the function about CNC mode and the kind of program are as follows.

    MDI mode Other mode
    MDI program O ×
    Selected program O O
    Not selected program O O
    O: Available / ×: Not available (The return code is EW_MODE)

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Specify the program number to read.
    When you read the MDI program, you have to specify -1.

    line_no in

    Specify the line number to read from.
    When you read from the first line of a program, you have tospecify 0.
    When you specify other than the existing line number, you get EW_DATA error as the return code.

    prog_data out

    Specify the address to the buffer to read the program text.

    line_len in/out

    Specify the amount of lines to read.
    After calling this function, the actual read line count is set.

    data_len in/out

    Specify the size of character to read.
    After calling this function, the actual read character size is set.


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program number(prog_no) error
    2 : The start line number(line_no) error
    3 : The amount of lines(*line_len) error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding).
    EW_REJECT CNC execution denied
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • MDI edit or Background edit processing in CNC side.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.

    program\cnc_rdprogline2

    Reads the NC program by line basis.

    This function cannot be used to MDI program.


    This function tries to read the amount of lines which is specified by (*line_len), but when the actual read character size reaches to the number of (*data_len) in this function, the reading process is aborted.
    And if the end character of the last line (EOB('\n')) is not finished to read, the last line is not counted as the read line count.

    Example)
    When you read from 1st to 3rd line of the following program, you have to specify more than 33 as the read character size. If you specify 30 as the character size, the read line count would be 2 because the 3rd line had not been read completely. Then 30 characters would be set in the specified buffer.
    O1234 ;
    N001 G01 X0. F100 ;
    N002 X20. ;
    N003 X50. ;
    N004 X80. ;
    N005 M30 ;
    %
    

    The conditions of the function about CNC mode and the kind of program are as follows.

    MDI mode Other mode
    MDI program (*1) ×(*2)
    Selected program O O
    Not selected program O O
    O: Available
    (*1) 16i:The return code is EW_DATA and the detail status is 1. 30i,0i-D/F,PMi-A:Available
    (*2) The return code is EW_MODE

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of the specified line by line_no.

    In this function, the execution pointer never moves like cnc_rdprogline.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdprogline2(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long *line_len, unsigned long *data_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Specify the program number to read.

    line_no in

    Specify the line number to read from.
    When you read from the first line of a program, you have tospecify 0.
    When you specify other than the existing line number, you get EW_DATA error as the return code.

    prog_data out

    Specify the address to the buffer to read the program text.

    line_len in/out

    Specify the amount of lines to read.
    After calling this function, the actual read line count is set.

    data_len in/out

    Specify the size of character to read.
    After calling this function, the actual read character size is set.


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program number(prog_no) error
    2 : The start line number(line_no) error
    3 : The amount of lines(*line_len) error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection (O8000-/O9000- protection, encoding).
    EW_REJECT CNC execution denied
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • MDI edit or Background edit processing in CNC side.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.
    EW_REJECT CNC execution denied
    CNC is in the emergency stop.

    program\cnc_rdseqnum

    Reads the sequence number of the NC program which is being currently executed in CNC.

    If the NC program has no sequence numbers in its all blocks, the sequence number of the last executed block is read.

    This function is used for watch the block being executed or the current process by the application program, or only displaying the current sequence number.

    The sequence number is stored in "buf.data" with unsigned binary format.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdseqnum(unsigned short FlibHndl, ODBSEQ *seqnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    seqnum out

    Pointer to the ODBSEQ structure including the sequence number under execution.
    The ODBSEQ structure is as follows.

    typedef struct odbseq {
         short  dummy[2] ;   /* Not used. */
         long  data     ;    /* Sequence number in executing. */
    } ODBSEQ ;
    

    ERRORS

    Code Description
    EW_PARAM CNC parameter error (Only Series 15)
    7613#0=0 when CNC is turned on.
    Set CNC parameter again.

    program\cnc_renameprog

    Changes the program number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_renameprog(unsigned short FlibHndl, long old_no, long new_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    old_no in

    Old program number

    new_no in

    New Program number


    ERRORS

    Code Description
    EW_BUSY Busy
  • Background edit processing in CNC side (except 30i/31i/32i, 0i-D/F, PMi-A)
  • Selected program(except EDIT mode, TJOG/THND mode with the playback option.)
  • CNC is in the emergency stop. (30i/31i/32i, 0i-D/F, PMi-A)
  • EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of OBDERR structure.
    1 : The old program number is not present.
    2 : The new program number has been already present.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
  • The old or new program number is protected.
  • EW_REJECT CNC execution rejection
  • Alarm in CNC side (except 30i/31i/32i, 0i-D/F, PMi-A)
  • program\cnc_resetpdf_pglock

    The protection of running/editing is released.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_resetpdf_pglock(unsigned short FlibHndl, char *prog_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    prog_name in

    Program name
    Specify the program name(full path) which wants to release the protection of running/editing.
    If you specified the not protected program name, the error occurs.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_DATA In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : The program specified by program name(prog_name) does not exist.
    3 : The program specified by program name(prog_name) has no protection of running/editing.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    program\cnc_resetpglock

    The protection of running/editing is released.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_resetpglock(unsigned short FlibHndl, long prog_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    prog_no in

    Specify the program number
    Specify the program number which wants to release the protection of running/editing.
    If you specified the not protected program number, the error occurs.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_DATA In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The number of 0 or less or 10000 or later(in case of program number eight digits : 100000000) was specified for program number(prog_no).
    2 : The program specified by program number(prog_no) does not exist.
    3 : The program specified by program number(prog_no) has no protection of running/editing.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    program\cnc_rewind

    Sets cursor to the top of selected NC program in CNC.


    MEM, EDIT mode(Series 30i/31i/32i, 0i-D/F, PMi-A)

    Program select none exist
    Availability of editing - Prohibition Permission
    Availability of searching(No.3202#6) - Prohibition(=0) Permission(=1) -
    Rewind not available available
    Return value EW_REJECT EW_PROT EW_OK

    other than MDI mode(Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i)

    Program select none exist
    Availability of editing - Prohibition Permission
    Availability of searching(No.3202#6) - Prohibition(=0) Permission(=1) -
    Rewind not available available
    Return value EW_OK

    When this function is executed during the subprogram call(STOP mode).

    Series 30i/31i/32i, 0i-D/F, PMi-A :

    Subprogram is rewinded.

    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i :

    Main program is rewinded. However when No.3204#1=1, EW_REJECT is returned.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rewind(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_MODE CNC mode error
    See the section of CNC mode.
    EW_PROT Program is protected from editing and searching. (Only Series 30i/31i/32i, 0i-D/F, PMi-A)
    EW_REJECT CNC execution denied
    EW_NOOPT No option
    The extended driver/library function is necessary.

    program\cnc_saveprog_end

    This function gets the result of cnc_saveprog_start function.
    If cnc_saveprog_start function is being executed, the return value is "EW_BUSY". Please command this function repeatedly until the return value becomes besides "EW_BUSY".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_saveprog_end(unsigned short FlibHndl, short *result);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    result out

    Specify the pointer of the variable to the return result of program saving.
    If the return value is "EW_OK", this argument is set as follows.

    Return code Meaning/Error handling
    EW_OK The save of programs is normal completion.
    EW_PARAM Error(CNC parameter error)
    EW_REJECT Error(CNC execution rejection)
    If this function cannot be executed by CNC, the return value is this error.

    ERRORS

    Code Description
    EW_FUNC Error (function is not executed, or not available)
    EW_BUSY Busy
    Wait until the completion of CNC processing.

    program\cnc_saveprog_start

    If CNC parameter HPM(No.11354#7) is set to 1, the programs are saved by calling with this function. In this case, this function requests save of program to CNC.
    If this function is commanded, it is necessary to confirm the result of program saving by cnc_saveprog_end function.

    A basic procedure for program saving is shown below.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_saveprog_start(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_REJECT CNC execution rejection
    cnc_saveprog_start function has been executed.
    Terminate a uploading by using cnc_saveprog_end function.

    program\cnc_searchresult

    Gets the result of cnc_searchword function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_searchresult(unsigned short FlibHndl, unsigned long *line_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    line_no out

    Specify the pointer to the variable to store the line number having the string that has been found by cnc_searchword. Unless the return code is EW_OK, the variable (*line_no) is not available.


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_FUNC cnc_searchword function was not called prior to this function
    EW_NUMBER Data number error
    The line number from which is started to search is not found.
    EW_DATA Data error
    The target string to search is not found.
    EW_NOOPT no option
    The extended driver/library function is necessary.

    program\cnc_searchword

    Searches the string within the NC program.

    The basic order to search is as follows.

    The conditions of the function about CNC mode and the kind of programare as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    If you have the playback option, TJOG/THND mode is the same as EDIT.

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    After you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to a certain place.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.

    In those cases, the execution pointer moves to the following place.

    • If the target string could be found, the pointer would move to the line where includes the target string.
    • If the target string could not be found, the pointer would move to the top of the program in case of the parameter "direct=0", or the bottom of the program in case of the parameter "direct=1".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_searchword(unsigned short FlibHndl, long prog_no, unsigned long line_no, short type, short direct, unsigned long repeat, char *prog_data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Specify the program number to search.
    When you write the MDI program, you have to specify -1.

    line_no in

    Specify the line number to search from.
    When you search from the first line of a program, you have to specify 0.
    When you specify other than the existing line number, this function never returns error result as the return code.
    In this case, next cnc_searchresult function would return EW_NUMBER error.

    type in

    Specify the type of the search operation.

    0 : Character search (Search the one address character.)
    1 : Word search (Search the string by word basis.)
    2 : Last line search (Search the bottom of line)

    When you commands "Character search", you have to set the only one address character as the target string.
    If you set except the address character or more than two characters, this function returns EW_DATA error.

    When you commands "Word search" for the only one address character, you have no error and the address character is going to be searched.

    When you commands "Last line search", this function ignores the parameters direct, repeat and prog_data.

    direct in

    Specify the direction to search.

    0 : Search towards the top of the program.
    1 : Search towards the bottom of the program.

    repeat in

    Specify the limitation of times the string is found when there are many strings matching within the program.
    If you specify 0, this function returns EW_DATA error.

    prog_data in

    Specify the pointer to the buffer holding the target string to search.
    It is a NULL terminated ASCII string. The size of string, including NULL character, must be within 34(30i/31i/32i, 0i-D/F, PMi-A:127). If it were more than maximum charactors, this function would return EW_DATA error.

    The first character of the string must be an address character (G, F, etc).
    After the address character, the next character must be a number, '+', '-' or '-'.
    If you use one of the following characters, you get EW_DATA error as the return code.

    • Except the available code for CNC
    • The small letter of alphabets
    • Address 'O' or the string consisted of 'O' + program number
    • '%'(EOR)


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program number(prog_no) error
    3 : The search type(type) error
    4 : The search direction(direct) error
    5 : The repeat count(repeat) error
    6 : The size of string error
    7 : The content of the string error
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    EW_REJECT CNC execution denied
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • MDI edit or Background edit processing in CNC side.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.

    program\cnc_seqsrch

    Searches the specified sequence number of the selected program in CNC.

    CNC mode is changed to "STOP" mode after searching.(except FS30i, FS0i-D/F, PMi-A)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_seqsrch(unsigned short FlibHndl, long seq_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    seq_no in

    Specify sequence number.


    ERRORS

    Code Description
    EW_DATA Data error
    The specified sequence number does not exist.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    See the section of CNC mode.
    EW_REJECT CNC execution denied
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.

    program\cnc_seqsrch2

    Searches the specified sequence number of the selected program in CNC.


    The searching speed of this function is more than cnc_seqsrch.

    The status of CNC does not change in this function though CNC becomes "STOP" mode by the cnc_search function after searches.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_seqsrch2(unsigned short FlibHndl, long seq_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    seq_no in

    Specify sequence number.


    ERRORS

    Code Description
    EW_DATA Data error
    The specified sequence number does not exist.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    See the section of CNC mode.
    EW_REJECT CNC execution denied
    • 30i/31i/32i
    • CNC is in the emergency stop.

    program\cnc_setpdf_pglock

    The running by the subprogram call to the program in the CNC memory is prohibited.
    And the following operations and the execution of function are prohibited.

    CNC operation
      1) Program edit and search
      2) O number search
      3) Program input/output from input-output device
    Library

      1) Program search and delete

        cnc_search, cnc_pdf_del
        -> EW_PROT error occurs
        cnc_pdf_delall
        -> The program which was protected by the parameter or this function is not deleted, but other program are deleted.

      2) Program downloading and verifying

        cnc_download3, cnc_dwnend3, cnc_download4, cnc_dwnend4, cnc_verify4, cnc_vrfend4
        -> EW_PROT error occurs

      3) Copy and rename of program.

        cnc_pdf_copy
        -> When the protected program number is specified for destination number, EW_PROT error occurs.
        cnc_pdf_rename
        -> When the protected program number is specified for old program number, EW_PROT error occurs.

      Note) Even if the program is protected by cnc_setpglock function, the edit by the line edit function is possible.

    Setting of the protection of running/editing can be set to program of 12.

    The setting by this function becomes effective until the setting is released by cnc_resetpdf_pglock or the CNC is turned off.

    The procedure to edit existing program by the application is shown as follows.

      1) The protection of running/editing to the program which wants to be edited is set by cnc_setpdf_pglock.
      2) The program is edited by the line editing function.
      3) The protection of running/editing is released by cnc_resetpdf_pglock and editing is end.
      * If you want to edit the new program, it is necessary to register the new program before the procedure 1.
    The protection of running/editing cannot be set to the following programs.
    • O0000 (In case of program number eight digits : "O00000000")
    • Selected program or running program (Main, nesting, executing)
    • Program protected by parameter. (O9000 or later etc.)
    • MDI program.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setpdf_pglock(unsigned short FlibHndl, char *prog_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    prog_name in

    Program name
    Specify the program name(full path) which wants to set the protection of running/editing.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_DATA Program number is worng.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : The program specified by program name(prog_name) does not exist.
    3 : The program specified by program name(prog_name) has already protection of running/editing.
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_OVRFLOW Overflow
    The protection of running/editing has already been set to the program of 12.
    EW_REJECT CNC execution rejection
    The selected program or running program(Main, nesting, executing) was specified for program name(prog_name).

    program\cnc_setpglock

    The running by the subprogram call to the program in the CNC memory is prohibited.
    And the following operations and the execution of function are prohibited.

    CNC operation
      1) Program edit and search
      2) O number search
      3) Program input/output from input-output device
    Library

      1) Program search and delete

        cnc_search, cnc_delete
        -> EW_PROT error occurs
        cnc_delall
        -> The program which was protected by the parameter or this function is not deleted, but other program are deleted.

      2) Program downloading and verifying

        cnc_download, cnc_cdownload, cnc_dwnend,cnc_verify, cnc_cverify, cnc_vrfend, cnc_download3, cnc_dwnend3
        -> EW_PROT error occurs

      3) Copy and rename of program.

        cnc_copyprog
        -> When the protected program number is specified for destination number, EW_PROT error occurs.
        cnc_renameprog
        -> When the protected program number is specified for old program number, EW_PROT error occurs.

      Note) Even if the program is protected by cnc_setpglock function, the edit by the line edit function is possible.

    Setting of the protection of running/editing can be set to each path.
    The protection of running/editing can be set to one path up to program of four.

    The setting by this function becomes effective until the setting is released by cnc_resetpglock or the CNC is turned off.

    The procedure to edit existing program by the application is shown as follows.

      1) The protection of running/editing to the program which wants to be edited is set by cnc_setpglock.
      2) The program is edited by the line editing function.
      3) The protection of running/editing is released by cnc_resetpglock and editing is end.
      * If you want to edit the new program, it is necessary to register the new program before the procedure 1.
    The protection of running/editing cannot be set to the following programs.
    • O0000 (In case of program number eight digits : "O00000000")
    • Selected program or running program (Main, nesting, executing)
    • Program protected by parameter. (O9000 or later etc.)
    • MDI program.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setpglock(unsigned short FlibHndl, long prog_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    prog_no in

    Program number
    Specify the program number which wants to set the protection of running/editing.
    Specify the program number of 1 or later registered in CNC.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_DATA Program number is worng.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The number of 0 or less or 10000 or later(in case of program number eight digits : 100000000) was specified for program number(prog_no).
    2 : The program specified by program number(prog_no) does not exist.
    3 : The program specified by program number(prog_no) has already protection of running/editing.
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PROT Protection error
    The program protected in program number(prog_no) by the parameter was specified.
    EW_OVRFLOW Overflow
    The protection of running/editing has already been set to the program of 4.
    EW_REJECT CNC execution rejection
    The selected program or running program(Main, nesting, executing) was specified for program number(prog_no).

    program\cnc_upend

    Notifies the end of uploading NC program to the internal logic of the Data window library.
    (This function must be executed after cnc_upload / cnc_cupload.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_upstart function has not been executed.

    program\cnc_upend3

    Notifies the end of uploading NC program to the internal logic of the Data window library.
    (This function must be executed after cnc_upload3 function.)

    There are cases where errors(EW_DATA, etc.) during execution of uploading NC program are returned by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upend3(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_upstart3 function has not been executed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : Program is not found within the specified range.
    3 : NC program memory is broken.
    See Description about the timing of error.
    EW_PROT Protected
    Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_REJECT CNC execution denied (Series 15i)
    Uploading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state (Series 15i)
    Alarm has occurred while uploading. See Description about the timing of error.

    program\cnc_upend4

    Notifies the end of uploading NC program to the internal logic of the Data window library.
    (This function must be executed after cnc_upload4 function.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upend4(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_upstart4 function has not been executed.
    EW_DATA In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : Program is not found within the specified range.
    3 : NC program memory is broken.
    See Description about the timing of error.
    EW_PROT Protected
    Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.

    program\cnc_upload

    Read NC program registered on the tape memory in CNC (program memory).

    The procedure of uploading is as follows.

    Format of input data

    NC program which is read from CNC is the string composed of ASCII characters as following format.

    % LF Oxxxx LF Block1 LF Block2 LF ... LF Mxx LF %

    where,

    LF 0x0A ('\n': EOB)
    Oxxxx Program number
    Mxx M code at the end of the program(M02,M30,etc.)

    A null character('0x00') is not added at the end of each string stored in the buffer.
    The last character of read NC program is '%'.
    If the application keeps reading by using this function after reading the last '%', only '%' can be read for Series 15/15i, nothing can be read for Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A.

    For example, when you read the following NC program using this function,
    O1234 ;
    G1 F0.3 W10. ;
    M30 ;
    %

      you will get the following strings.

    • In case of fully large buffer.
    • Series 15/15i
      1st time "%\nO1234\nG1F0.3W10.\nM30\n%" (24 characters)
      2nd and after "%" (1 character)
      Series Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      1st time "%\nO1234\nG1F0.3W10.\nM30\n%" (24 characters)
      2nd and after "" (0 character)

    • And in case that the buffer size is less than 24 bytes, you will get the following strings.

    • In case that the buffer size is 10 bytes. Series 15/15i
      1st time "%\nO1234\nG1" (10 characters)
      2nd time "F0.3W10.\nM" (10 characters)
      3rd time "30\n%" (4 characters)
      4th and after "%" (1 characters)
      Series Series 16/18/21, 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
      1st time "%\nO1234\nG1" (10 characters)
      2nd time "F0.3W10.\nM" (10 characters)
      3rd time "30\n%" (4 characters)
      4th and after "" (0 characters)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upload(unsigned short FlibHndl,ODBUP *upld,unsigned short *number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    upld out

    Pointer to the ODBUP structure including the NC program.

    The ODBUP structure is as follows.

    typedef struct odbup {
        short   dummy[2] ;              /* Not used. */
        char    data[MAX_RBUF] ;        /* NC program data. */
    } ODBUP ;                       (MAX_RBUF : maximum character number to read)
    

    The default value of read buffer size (MAX_RBUF) with ODBUP structure is 256.
    In order to read more characters at a time, it is necessary to customize.

    number in/out

    Specify the address of the variable which shows number of characters to be read.
    Set read number of characters by one time to this variable(*number).
    After reading,the number of characters actually read is set in this variable(*number) again.


    ERRORS

    Code Description
    EW_FUNC cnc_upstart function has not been executed.
    EW_LENGTH Data block length error
    The read number of characters of NC program number(*number) is 0.

    program\cnc_upload3

    Read NC data registered on the memory in CNC.

    This function reads the characters of NC data as long as it is specified by '*length'.
    However, if the number of characters to read is less than the specified number by delaying CNC data process, this function reads the characters as many as possible and then sets length' with the real number of characters which are read in the buffer.

    In case that this function cannot read at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed. Namely, an error status may refrect the result caused by the previously executed cnc_upload3 callings. And the error status for some cnc_upload3 callings just before the finish of uploading is returned by cnc_upend3 function.


    Format of input data

    NC data which is read from CNC is the string composed of ASCII characters as following format.

    % LF Block1 LF Block2 LF ... LF %
    where LF = 0x0A ('\n')

    or

    % LF CR CR Block1 LF CR CR Block2 LF CR CR ... LF CR CR %
    where CR = 0x0D ('\r') , LF = 0x0A ('\n')

    The parameter (Series 15i:0000#3, Series 16i/18i/21i/0i/Power Mate i:0100#3) determines which is used. And space code (' ') may be inserted before LF for TV check.
    See the CNC operaation manual for details.

    A null character('\x00') is not added at the end of each string stored in the buffer.
    The last character of read NC data is '%'. If the application keeps reading by using this function after reading the last '%', cnc_upload3 returns EW_RESET.


    In case of 30i/31i/32i, 0i-D/F and PMi-A, when the CNC parameter No.6019#0 is '1', the number of the macro variable and the variable data are output as a comment continuously after '%' of the end of data.

    The last character of comment data is also '%'. If the application keeps reading by using this function after reading the last '%', cnc_upload3 returns EW_RESET.

    In case of 30i/31i/32i, 0i-D/F and PMi-A, the protected NC program(O8000-/O9000- protection, encoding) is acquired as "% LF % LF", and EW_PROT error will return by cnc_upend3.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upload3(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the pointer of the variable to the character length of NC data.
    Set read number of characters by one time to it and it must be a multiple of 256. (except 30i/31i/32i, 0i-D/F, PMi-A)

    After reading, the number of characters actually read is set in this variable again.

    This function returns EW_LENGTH if '*length' is less than 256.

    data out

    Specify the pointer to the buffer to be read.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    The data to read is nothing.
    Call the cnc_upend3 function.
    EW_FUNC cnc_upstart3 function has not been executed.
    EW_LENGTH The size of character string is less than 256. (except 30i/31i/32i, 0i-D/F, PMi-A)
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : Program is not found within the specified range.
    3 : NC program memory is broken.
    See Description about the timing of error.
    EW_PROT Protected (except 30i/31i/32i, 0i-D/F, PMi-A)
    Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_BUFFER Buffer empty/full
    Retry because the buffer is empty.
    See Description about the timing of error.
    EW_REJECT CNC execution denied (Series 15i)
    Uploading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state (Series 15i)
    Alarm has occurred while uploading. See Description about the timing of error.

    program\cnc_upload4

    Read NC data registered on the memory in CNC.

    This function reads the characters of NC data as long as it is specified by '*length'.
    However, if the number of characters to read is less than the specified number by delaying CNC data process, this function reads the characters as many as possible and then sets length' with the real number of characters which are read in the buffer.

    In case that this function cannot read at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed. Namely, an error status may refrect the result caused by the previously executed cnc_upload callings. And the error status for some cnc_upload callings just before the finish of uploading is returned by cnc_upend4 function.

    Format of input data

    NC data which is read from CNC is the string composed of ASCII characters as following format.

    % LF Block1 LF Block2 LF ... LF %
    where LF = 0x0A ('\n')

    or

    % LF CR CR Block1 LF CR CR Block2 LF CR CR ... LF CR CR %
    where CR = 0x0D ('\r') , LF = 0x0A ('\n')

    The parameter (Series 15i:0000#3, Series 16i/18i/21i/0i/Power Mate i:0100#3) determines which is used. And space code (' ') may be inserted before LF for TV check.

    A null character('\x00') is not added at the end of each string stored in the buffer.
    The last character of read NC data is '%'. If the application keeps reading by using this function after reading the last '%', cnc_upload3 returns EW_RESET.

    When the CNC parameter No.6019#0 is '1', the number of the macro variable and the variable data are output as a comment continuously after '%' of the end of data.

    The last character of comment data is also '%'. If the application keeps reading by using this function after reading the last '%', cnc_upload4 returns EW_RESET.

    The protected NC program(O8000-/O9000- protection, encoding) is acquired as "% LF % LF", and EW_PROT error will return by cnc_upend4.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upload4(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the pointer of the variable to the character length of NC data.
    Set read number of characters by one time to it and it must be a multiple of 256.

    After reading, the number of characters actually read is set in this variable again.

    This function returns EW_LENGTH if '*length' is less than 256.

    data out

    Specify the pointer to the buffer to be read.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    The data to read is nothing.
    Call the cnc_upend4 function.
    EW_FUNC cnc_upstart4 function has not been executed.
    EW_LENGTH The size of character string is less than 256.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    2 : Program is not found within the specified range.
    3 : NC program memory is broken.
    See Description about the timing of error.
    EW_PROT Protected
    Tape memory is read-protected by the CNC parameter setting(O8000-/O9000- protection, encoding).
    See Description about the timing of error.
    EW_BUFFER Buffer empty/full
    Retry because the buffer is empty.
    See Description about the timing of error.

    program\cnc_upstart

    Notifies the start of uploading NC program to the internal logic of the Data window library.
    (This function must be executed before cnc_upload / cnc_cupload.)

    In Series 16/18,16i/18i, 0i-F, 30i, Power Mate i, t is possible to use this function for the program number 8 digits, however it is necessary to switch API to the one for the program number 8 digits.
    In Series 15i, it is necessary to switch API to the one for the program number 8 digits.
    See Program number 8 digits for details.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upstart(unsigned short FlibHndl, short number);For the program number 8 digits : FWLIBAPI short WINAPI cnc_upstart(unsigned short FlibHndl,long number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    number in

    Specify program number


    ERRORS

    Code Description
    EW_FUNC (Series 15i,16/18,16i/18i, 30i, Power Mate i)
    Unavailable
    This application is not customized for the program number 8 digits.
    See "Library handle" for details.
    EW_BUSY Busy
    Series15/15i
    • cnc_upstart function has been executed.
    • Terminate an uploading by using cnc_upend function.
    Series 16i/18i/21i, 16/18/21, 0i, 30i, Power Mate i, PMi-A
    • cnc_upstart function has been executed.
    • Terminate an uploading by using cnc_upend function.
    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    EW_DATA Data error
    Program(number) is not found.

    program\cnc_upstart3

    Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the Data window library.
    (This function must be executed before cnc_upload3.)

    cnc_upload3 function and cnc_upend3 function will return EW_FUNC in case that cnc_upstart3 function is not executed.

    A basic procedure for upload is shown below.

    In case of uploading NC programs, specify the upload start program number to 's_number' and the upload end program number to 'e_number'.

    In case of uploading only one program, specify its program number as s_number = e_number.
    And in case of uploading all program, specify -9999 to 's_number' and 0 to 'e_number'.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upstart3(unsigned short FlibHndl, short type, long s_number, long e_number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of the data.

    0 : NC program
    1 : Tool offset data
    2 : Parameter
    3 : Pitch error compensation data
    4 : Custom macro variables
    5 : Work zero offset data
    7 : Operation history data(except 15i)
    18 : Rotary table dynamic fixture offset(30i series only)
    s_number in

    Specify the start program number to read.
    Valid when 0 is specified for the argument "type".

    e_number in

    Specify the end program number to read.
    Valid when 0 is specified for the argument "type".


    ERRORS

    Code Description
    EW_BUSY Busy

    Series 15i
    • cnc_upstart3 function has been executed.
    • Terminate a uploading by using cnc_upend3 function.

    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.

    Series 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • cnc_upstart3 function has been executed.
    • Terminate a uploading by using cnc_upend3 function.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program number (s_number, e_number) is illegal.
    EW_ATTRIB Data attribute error
    Data type (type) is illegal.
    EW_NOOPT No option

    Series 15i
    • In case of custom macro variables or pitch error compensation data, this function needs the option for the target data.
    Series 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • In case of custom macro variables, work zero offset or pitch error compensation data, this function needs the option for the target data.
    EW_PARAM CNC parameter error (Series 15i)

    • Parameter (No.21,23:Output device) is wrong.
    EW_MODE CNC mode error (in case of NC program in Series 16i/18i/21i, 0i-A/B/C, Power Mate i)
    • MDI mode
    • Change CNC mode to any mode except MDI.

    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.
    EW_REJECT CNC execution denied (Series 16i/18i/21i, 0i-A/B/C, Power Mate i)
    • CNC is machining
    • Data except the "NC program" cannot be uploaded while running automatically.
    EW_ALARM Alarm state (Series 16i/18i/21i, 0i-A/B/C, Power Mate i)
    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    EW_PASSWD Specified CNC data cannot be read because the data is protected.(Series 16i/18i/21i, 0i-A/B/C)

    program\cnc_upstart4

    Notifies the start of uploading NC data (NC program, tool offset, etc.) to the internal logic of the Data window library.
    (This function must be executed before cnc_upload4.)

    In case of upload for NC programs, a source file or a destination folder can be specified.

    cnc_upload4 function and cnc_upend4 function will return EW_FUNC in case that cnc_upstart4 function is not executed.

    A basic procedure for upload is shown below.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_upstart4(unsigned short FlibHndl, short type, char* file_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the kind of the data.

    0 : NC program
    1 : Tool offset data
    2 : Parameter
    3 : Pitch error compensation data
    4 : Custom macro variables
    5 : Work zero offset data
    7 : Operation history data
    8 : Maintenance information
    18 : Rotary table dynamic fixture offset
    file_name in

    Specify a source file name or a source folder name for upload. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.)

    In case of a file name only, not a full path name, the file in a current folder is read. In case of a folder name, all programs in the folder are read, In case of NULL, all programs in a current folder are read.

    Example :
    File name only : "O1234"
    Folder name : "//CNC_MEM/USER/PATH1/"
    Path + file name : "//CNC_MEM/USER/PATH1/O1234"
    It is available when type = 0.

    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder and file name.

    ERRORS

    Code Description
    EW_BUSY Busy
    • cnc_upstart4 function has been executed.
    • Terminate a uploading by using cnc_upend4 function.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerrfunction.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program number (s_number, e_number) is illegal.
    EW_ATTRIB Data attribute error
    Data type (type) is illegal.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program file name or folder name is wromg.
    See Description about the timing of error.
    EW_NOOPT No option
    In case of custom macro variables, work zero offset or pitch error compensation data, this function needs the option for the target data.

    program\cnc_verify

    Outputs NC program to be compared with already registered one to CNC.

    When the data processing on the CNC side is delayed and the data cannot be transferred, this function waits until it can be transferred.
    If an application cannot wait, use the cnc_cverify function.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, EW_OVRFLOW, etc.) may be delayed.
    Namely, an error status may refrect the result caused by the previously executed cnc_verify callings.
    And the error status for some cnc_verify callings just before the finish of verifying is returned by cnc_vrfend function.

    Refer to the description of cnc_download function for the format of output data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_verify(unsigned short FlibHndl, char *data, short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data in

    Specify the top address of NC program data.

    number in

    Specify the number of characters of NC program data. (1 - 256)


    ERRORS

    Code Description
    EW_RESET HSSB
      Reset or stop request
      CNC required to stop verification.
      'RESET or STOP' was pushed.(Series 15/15i)
      Call the cnc_vrfend function.
    Ethernet
      Reset or stop request
      CNC required to stop verification.
      Call the cnc_vrfend function.
    EW_FUNC cnc_vrfstart function has not been executed.
    EW_LENGTH Data block length error
    Length of data block(number) exceeds 256 bytes.
    EW_DATA Data error
    • Any difference has been detected during comparing process.
    • A character which is unavailable for NC program is detected.
    • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    See Description about the timing of error.

    program\cnc_verify4

    Outputs NC program to be compared with already registered one to CNC.

    This function outputs the characters of NC program as long as it is specified by '*length'.
    However, if there is no room to store the specified number of character, this function stores the characters as many as possible to fill the buffer and then sets '*length' with the real number of characters which are stored in the buffer.

    In case that this function cannot output at least one character, it returns EW_BUFFER, so again call this function with the same arguments.

    Because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed. Namely, an error status may refrect the result caused by the previously executed cnc_verify4 callings.
    And the error status for some cnc_vreify4 callings just before the finish of downloading is returned by cnc_vrfend4 function.


    Refer to the description of cnc_download4 function for the format of output data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_verify4(unsigned short FlibHndl, long *length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in/out

    Specify the ponter of the variable to the character length of NC data.
    When this function returns, the actual number of characters that are output to CNC will be set.

    This function returns EW_LENGTH if '*length' has the value of zero or negative.

    data out

    Specify the ponter of the variable to NC data.


    ERRORS

    Code Description
    EW_RESET Reset or stop request
    CNC required to stop verifiing.
    Call the cnc_vrfend4 function.
    EW_FUNC cnc_vrfstart4 function has not been executed.
    EW_LENGTH The size of character string is zero or negative.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters (including 'LF' at the end of the block) is detected.
    3 : Any difference has been detected during comparing process.
    See Description about the timing of error.
    EW_BUFFER Buffer full
    Retry because the buffer is full.
    See Description about the timing of error.
    EW_REJECT CNC execution denied
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_vrfend

    Notifies the end of verification of NC program to CNC.
    (This function must be executed after cnc_verify/cnc_cverify.)

    There are cases where errors(EW_DATA,EW_OVRFLOW, etc.) during execution of verifying NC program are returned by this function.

    Further, this function does not return until the verification of the output data by cnc_verify(cnc_cverify) is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_vrfend(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_vrfstart function has not been executed.
    EW_DATA Data error
    • Any difference has been detected during comparing process.
    • A character which is unavailable for NC program is detected.
    • When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    Confirm the above-mentioned point.
    See 'Description' about the generation timing.

    program\cnc_vrfend4

    Notifies the end of verification of NC program to CNC.
    (This function must be executed after cnc_verify4.)

    There are cases where errors(EW_DATA, etc.) during execution of verifying NC program are returned by this function.

    Further, this function does not return until the verification of the output data by cnc_verify4 is completed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_vrfend4(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_vrfstart4 function has not been executed.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : A character which is unavailable for NC program is detected.
    2 : When TV check is effective, a block which includes odd number of characters(including 'LF' at the end of the block) is detected.
    3 : Any difference has been detected during comparing process.
    See Description about the timing of error.
    EW_REJECT CNC execution denied
    Downloading is disable in the current CNC status.
    (Machining, resetting, mode changing)
    See Description about the timing of error.
    EW_ALARM Alarm state
    Alarm has occurred while downloading.
    See Description about the timing of error.

    program\cnc_vrfstart

    Requests CNC to start verification of NC program.
    (This function must be executed before cnc_verify/cnc_cverify.)

    It is possible to compare already registered NC program in CNC and a program which is output by the application program.

  • HSSB
  • In the case of Series 15/15i, when the CNC side is in background edit processing, this function waits the termination of background edit.

    The procedure of verify is as follows.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_vrfstart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY Busy
    Series 15i
    • cnc_vrfstart(cnc_dwnstart3)function has been executed.
    • Terminate a verifying (downloading) by using cnc_vrfend(cnc_dwnend3)function.

    • Background edit processing in CNC side (Ethernet only)
    • Terminate background edit processing in CNC side.
    Series 16i/18i/21i, 0i, 30i, Power Mate i, PMi-A
    • cnc_vrfstart(cnc_dwnstart3) function has been executed.
    • Terminate a verifying (downloading) by using cnc_vrfend(cnc_dwnend3) function.

    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.

    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.

    • MDI mode
    • Change CNC mode to any mode except MDI.
    EW_FUNC Parameter (No.20,22:Input device) is wrong. (Series 15/15i)

    program\cnc_vrfstart4

    Requests CNC to start verification of NC program. (This function must be executed before cnc_verify4)

    cnc_verify4 function and cnc_vrfend4 function will return EW_FUNC in case that cnc_vrfstart4 function is not executed.

    The procedure of verify is as follows.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_vrfstart4(unsigned short FlibHndl, char* dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_name in

    Specify a destination folder name for verifying. (The maximum length of the character string is 241 and the string should be included by NULL('\0') terminate character.)
    When NULL is specified, a destination folder becomes a current folder.

    Example : "//CNC_MEM/USER/PATH1/"
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC does another program edit operation.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : Program folder name is wromg.
    See Description about the timing of error.
    EW_ALARM Alarm state
    • Alarm (PW000) on CNC side
    • Reset the alarm on CNC.

    program\cnc_wractpt

    Sets the execution pointer of the NC program for the MDI or Memory operation.

    If there are some blocks that CNC has already read, these blocks will be executed before the block specified by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wractpt(unsigned short FlibHndl, long prog_no, short type, long *blk_no);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Program number
    When you write the MDI program, you have to specify -1.

    You can set the pointer for the current selected program. If the selected program is called by calling macro or sub-program (that is a nested program), you also can set the pointer to it(16i/18i/21i/30i/31i/32i/0i-D/F, PMi-A only).

    type in

    Type of the execution pointer you will set.

    0 : Absolute pointer (The block number from the top of the program when the top is 0.)
    1 : Relative pointer (The relative value from the current execution pointer.)
    blk_no in/out

    Pointer to the long type variable holding the block number to set.

    In case of 30i, 0i-D/F and PMi-A, when the block number which is not present is specified in MDI program, the cursor moves to the last line.

    In case of type = 0
    • Specify the block number from the top of the program when the top is 0.
    In case of type = 1
    • Specify the relative value from the current execution pointer.
    • When the specified block number is 0, the execution pointer is not changed and the actual absolute block number is stored into (*blk_no).
    The examples of the absolute pointer and relative one are as follows:
    Selected NC program Absolute Relative
    O1234; 0 -3
    G00 X0. Z0.; 1 -2
    G01 X10. Z5. F100.; 2 -1
    X20. Z15.; 3 0
    X35.; 4 1
    Z20; 5 2
    M30; 6 3
    % 7 4
    * In this case, the execution pointer is on the block having "X20. Z15.;".

    ERRORS

    Code Description
    EW_ATTRIB Data attribute error
    Type is illegal.
    EW_DATA Data error
    • The program number(prog_no) is not present.
    • The block number(*blk_no) is not present.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    • Except MDI and EDIT mode
    • prog_no is not -1 in MDI mode
    • prog_no is -1 in EDIT mode
    • Selected program number is specified in MEM mode(16i)
    EW_REJECT CNC execution denied
    • CNC is machining right now.
    • MDI program is not present(16i).
    • The program is nested.
    • No program is selected.
    • Some alarm in CNC. (except 30i/31i/32i, 0i-D/F, PMi-A)
    • CNC is in the emergency stop. (30i/31i/32i, 0i-D/F, PMi-A)

    program\cnc_wrmdipntr

    Specify the execution starting pointer for MDI operation. (It is impossible to operate the execution pointer directly)

    Register the MDI program previously according to the cnc_wrmdiprog function before executing this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmdipntr(unsigned short FlibHndl, long crntpntr);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    crntpntr in

    Specify the block pointer to execute first.


    ERRORS

    Code Description
    EW_DATA Data error
    The specification of the block point to execute first(crntpntr) is illegal.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    Set CNC mode to MDI.
    EW_REJECT CNC execution denied
  • Edit processing in the CNC side.
  • MDI program is not registered.
  • Register the MDI program previously according to the cnc_wrmdiprog function.

    program\cnc_wrmdiprog

    Outputs NC program for MDI operation to CNC.

  • HSSB
  • Refer description of cnc_dnc function for the format of output data.

  • Ethernet
  • Refer description of cnc_download3 function for the format of output data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmdiprog(unsigned short FlibHndl, short length, char *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the number of characters of NC program to be written.

    Series 15 1 ,.., 199
    Series 15i 1 ,.., 255
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C 1 ,.., 470
    Series 30i, 0i-D/F, PMi-A 1 ,.., 500
    Power Mate i 1 ,.., 500
    Series 16i/18i-W 1 ,.., 472

    data out

    Specify the top address of NC program data.

    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the number of characters of NC program to be written.
    1 ,.., 512

    data out

    Specify the top address of NC program data.


    ERRORS

    Code Description
    EW_BUSY Busy
    Series 16/18/21, 16i/18i/21i, 0i-A/B/C, Power Mate i
    • Background edit processing in CNC side
    • Terminate background edit processing in CNC side.

    • Alarm (PS000, PS101) on CNC side
    • Reset the alarm on CNC.
    EW_LENGTH Data block length error
    Length of the block (length) is illegal.
    EW_DATA Data error
    A character which is unavailable for CNC program is detected.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    Set CNC mode to MDI.
    EW_REJECT CNC execution denied
    MDI operation in progress
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.

    program\cnc_wrpdf_attr

    Changes the attribute of folder or file under the specified folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).

    When the specified folder is selected as the current folder, the attribute cannot be changed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpdf_attr(unsigned short FlibHndl, char *file_path,IDBPDFTDIR *pdf_tdir);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    file_path in Specify the pointer for the string that stores "Current drive + folder + file name".
    String length can be up to 242 characters. The string must be NULL terminated.
    In case of folder name, place "/" at the end of string. If there is no "/", it is regarded as the string for file.
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.
    pdf_tdir in

    Specify the pointer for the IDBPDFTDIR structure that stores the information about folder/file to be changed.
    The IDBPDFTDIR structure is as follows.

    typedef struct idbpdftdir {
        unsigned long slct;         /* setting selection */
        unsigned long attr;         /* setting attribute */
    } IDBPDFTDIR;
    
    slct
    Specify 1 only for the bit to be modified.
    Set 0 to the bits that are not described beneath.
    attr
    Specify the attribute data you want to set.
    Only bit data specified as 1 by "slct" will be changed with the data by "attr".


    [attribute of folder]
    #0 : Editing 0:permitted 1:prohibited
    #1 : Editing/displaying 0:permitted 1:prohibited

    [attribute of file]
    #0 : Editing 0:permitted 1:prohibited
    #1 : Editing/displaying 0:permitted 1:prohibited
    #2 : Encryption 0:OFF 1:ON
    #8..#10 : Modify protection level
    Numerical value 0..7 by #10-MSB, #8-LSB
    #12..#14 : Output protection level
    Numerical value 0..7 by #14-MSB, #12-LSB
    When you want to change Modify protection level/Output protection level, turn all 3 bits on at the corresponding bit location at "slct".

    ERRORS

    Code Description
    EW_ATTRIB data attribute error
    When the option of "Protection of Data at Eight Levels" was invalid, the attribute for "Protection of Data at Eight Levels" was specified for argument slct. ("1" was set in either of slct(#8-31).)
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : File/folder name format error
    2 : Specified file/folder cannot be found.
    5 : Specified file/folder is selected on CNC side
    7 : The changing of attribute to specified file is prohibited by the template program function.
    8 : The changing of attribute to specified folder is prohibited by the template program function.
    EW_PROT Write protected
    Specified file/folder is prohibited from writing.
    Or, it is protected by the protection level.
    EW_REJECT CNC execution rejected
    CNC is on execution.

    program\cnc_wrpdf_curdir

    Sets the current folder.
    Execution of this function is kept waiting when CNC is in editing(including the background edit state).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpdf_curdir(unsigned short FlibHndl, short dir_kind, char *dir_name);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    dir_kind in

    Specify the kind of current folder to be set.

    1 : Foreground
    2 : Background

    dir_name in

    Specify the pointer for the string that stores "Current drive + folder".
    Allocate 212 byte length for the string maximum size of 210 characters. The string must be NULL terminated.

    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the folder name.

    ERRORS

    Code Description
    EW_ATTRIB data error
    The dir_kind is invalid.
    EW_DATA data error
    The folder specified by (dir_name) does not exist.
    EW_REJECT CNC execution rejected

    program\cnc_wrpdf_line

    Writes the NC program by line basis.

    You cannot change a program file name in the top of the program.
    If you try to change it, you get EW_DATA ad the return code.

    The conditions of the function about CNC mode and the kind of program are as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    If you have the playback option, TJOG/THND mode is the same as EDIT.

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.


    When the reset processing is executed in CNC, the processing interrupts can be selected according to the parameter LES(No.11353#3).

    Inc case of parameter LES(No.11353#3)=0 : The process is not interrupted.

    Inc case of parameter LES(No.11353#3)=1 : The process is interrupted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpdf_line(unsigned short FlibHndl, char *prog_name, unsigned long line_no, char *prog_data, unsigned long data_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_name in

    Program path makes of the "drive name","path name" and "file name".
    Please refer to "General Description (Specifying the folder and file name for FS30i, 0i-D/F and PMi-A.)" for details of the file name.
    If the value of "prog_name" is NULL, the previous progaram name is specifed.
    When you use this function for the MDI program , you have to be specifed the "MDI".

    line_no in

    Specify the line number to write.
    When you write to the first line(Program Name or Program Number) of a program, you have to specify 0.

    prog_data in

    Specify the pointer to the buffer holding the program text.
    According to the following attentions, full the buffer with ASCII codes before writing.

    • Do not use except the meaning code for CNC.
    • Do not use the small letter of alphabets.
    • Do not use '%' (EOR).
    Although there are several EOB('\n') in the buffer, you can only replace the one line. In other words, you can replace one line with several lines using several EOB in the program text to write.

    data_len in

    Specify the size of character to write.
    This function checks the free area in CNC memory beforewriting. If there is no more than (this character size + 100) in this area, this function returns EW_OVRFLOW as the return code without writing.
    The character number you can write at the once is up to 200.


    ERRORS

    Code Description
    EW_BUSY Busy
    CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program name(prog_name) error
    2 : The line number(line_no) error
    3 : The character size(data_len) error
    4 : O number would be changed
    5 : The first character of string is illegal
    6 : Error happens when deleting line
    7 : Error happens when writing program
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    EW_OVRFLOW Memory overflow
    It is lack of free area in CNC memory.
    Make enough free area in CNC memory.
    EW_MODE CNC mode error
    EW_REJECT CNC execution denied
    MDI edit or Background edit processing in CNC side.

    program\cnc_wrprogline

    Writes the NC program by line basis.

    When you specify the same number("Oxxxx") in the top of the program, this function deletes the character after O number, but doesn't delete O number.
    When you specify the different number("Oxxxx") in the top of the program, you get EW_DATA ad the return code.

    The conditions of the function about CNC mode and the kind of program are as follows.

    EDIT mode MDI mode Other mode
    MDI program × O ×
    Selected program O × ×
    Not selected program O O O
    O: Available / ×: Not available (The return code is EW_MODE)

    If you have the playback option, TJOG/THND mode is the same as EDIT.

    This function works normally if OP signal is 1 but STL signal is 0 (for example, feed hold stopping, single block stopping, etc).

    When you use this function for the MDI program or the selected program in the following situations, the execution pointer goes to the top of line specified by line_no.

    • MDI program in MDI mode.
    • Selected program in EDIT mode.
    • Selected program in TJOG/THND mode with the playback option.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrprogline(unsigned short FlibHndl, long prog_no, unsigned long line_no, char *prog_data, unsigned long data_len);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    prog_no in

    Specify the program number to write.
    When you write the MDI program, you have to specify -1.

    line_no in

    Specify the line number to write.
    When you write to the first line of a program, you have to specify 0.
    When you specify other than the existing line number, you get EW_DATA error as the return code.

    prog_data in

    Specify the pointer to the buffer holding the program text.
    According to the following attentions, full the buffer with ASCII codes before writing.

    • Do not use except the meaning code for CNC.
    • Do not use the small letter of alphabets.
    • Do not use '%' (EOR).
    Although there are several EOB('\n') in the buffer, you can only replace the one line. In other words, you can replace one line with several lines using several EOB in the program text to write.

    data_len in

    Specify the size of character to write.
    This function checks the free area in CNC memory beforewriting. If there is no more than (this character size + 100) in this area, this function returns EW_OVRFLOW as the return code without writing.
    Attention) The character number you can write at the once is up to 200. (30i/31i/32i, 0i-D/F and PMi-A are 716 characters)


    ERRORS

    Code Description
    EW_BUSY Busy
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • Some alarm has existed or CNC is searching the program text right now.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is searching the program text right now.
    EW_DATA Data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    1 : The program number(prog_no) error
    2 : The line number(line_no) error
    3 : The character size(data_len) error
    4 : O number would be changed
    5 : The string is illegal
    6 : Error happens when deleting line
    7 : Error happens when writing program
    When the detail status is "5", the illegal string type will be set in errdt_no.
    1 : "\"
    3 : ";"
    0 : others
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_MODE CNC mode error
    EW_PROT Write protection in CNC side
    CNC parameter is a state of write-protection(O8000-/O9000- protection, encoding).
    Protect KEY signal was ON. (Writing the MDI program is excluded)(except 30i/31i/32i, 0i-D/F, PMi-A)
    EW_REJECT CNC execution denied
    The specified program is running.
    • except 30i/31i/32i, 0i-D/F, PMi-A
    • MDI edit or Background edit processing in CNC side.
    • 30i/31i/32i, 0i-D/F, PMi-A
    • CNC is in the emergency stop.
    EW_OVRFLOW Memory overflow
    It is lack of free area in CNC memory.
    Make enough free area in CNC memory.

    punch\cnc_rd1punchtl_ex

    Various tool registration data (tool number, tool punch frequency, and tool shape, etc.) corresponding to the specified tool registration number is read.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd1punchtl_ex(unsigned short FlibHndl, IODBPUNCH1_EX *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf in/out

    Pointer for returning various tool registration data (tool number, tool punch frequency, and tool shape, etc.) to a iodbpunch1_ex structure.

    typedef struct iodbpunch1_ex {
        unsigned short  number ;            /* Data number(N)      */
        unsigned short  attr ;              /* Data attribute(M)   */
        union {
            unsigned short  u2data ;        /* Unsigned 2 bite     */
            short           s2data ;        /* Signed 2 bite       */
            unsigned long   u4data ;        /* Unsigned 4 bite     */
            long            s4data ;        /* Signed 4 bite       */
            unsigned long   u8data[2] ;     /* Unsigned 8 bite     */
        } u ;
        short           decimal ;           /* Decimal places      */
        short           reserve ;           /* Reserve             */
    } IODBPUNCH1_EX ;
    
    number
    Specify Tool registration number .
    attr
    Specify kind of Read data.
    buf.u
    The Read data is stored by each data form.
    The kind of the data number that can be specified, the data attribute , and the read data is shown in the following tables.
    (a) Without the tool data setting function
      Kind of read data number attr Member at storage destination Range of value
      Number of use tools 0 0 u2data 0〜136
      Number of turret calculations 0 1 u2data 0〜136
      Starting point tool number 0 2 u2data 0〜9999
      Amount of turret axis movement 0 3 u4data , decimal Refer to standard parameter setting table (B)
      Total punch frequency 0 4 u8data 0〜999999999999999999
      Tool number Nr 0 u2data 0〜9999
      Punch number Nr 1 u4data 0〜65535
      Amount of X axis tool position correction Nr 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of Y axis tool position correction Nr 3 s4data , decimal Refer to standard parameter setting table (A)
      Turret calculation position Nr 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number for tool change Nr 5 u2data 0〜9999
      Tool life Nr 6 u4data 0〜65535
      Tool shape for graphic drawing(C) Nr 7 u2data 0〜99
      Size of tool for graphic drawing(I) Nr 8 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nr 9 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nr 10 u4data , decimal IS-Bの場合、0.0〜359.999

    Nr: Tool registration number ( =1〜136 )
    ※For multi tool control
      Kind of read data number attr Member at storage destination Range of value
      Small tool number Nm 0 u2data 0〜9999
      Small tool calculation angle Nm 1 s4data , decimal 0.0-359.999 in case of IS-B
      Amount of Y axis tool position correction Nm 2 s4data , decimal Refer to standard parameter setting table (A)
      Tool shape for graphic drawing(C) Nm 3 u2data 0〜99
      Size of tool for graphic drawing(I) Nm 4 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nm 5 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nm 6 u4data , decimal 0.0〜359.999 in case of IS-B

    Nm: Multitool tool registration number + 200( =201〜264 )
    (b) With the tool data setting function
      Kind of read data number attr Member at storage destination Range of value
      Number of use tools 0 0 u2data 0〜9999
      Number of turret calculations 0 1 u2data 0〜9999
      Starting point tool number 0 2 u2data/u4data 0〜99999999
      Amount of turret axis movement 0 3 u4data , decimal Refer to standard parameter setting table (B)
      Total punch frequency 0 4 u8data 0〜999999999999999999
      Tool number Nr 0 u2data/u4data 0〜99999999
      Punch number Nr 1 u2data/u4data 0〜999999999
      Amount of X axis tool position correction Nr 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of Y axis tool position correction Nr 3 s4data , decimal Refer to standard parameter setting table (A)
      Turret calculation position Nr 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number for tool change Nr 5 u2data/u4data 0〜99999999
      Tool life Nr 6 u2data/u4data 0〜999999999
      Tool shape for graphic drawing(C) Nr 7 u2data 0〜99
      Size of tool for graphic drawing(I) Nr 8 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nr 9 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nr 10 u4data , decimal 0.0〜359.999 in case of IS-B
      Small tool calculation angle Nr 11 s4data , decimal 0.0〜359.999 in case of IS-B
      Radius of multi tool Nr 12 u4data , decimal Refer to standard parameter setting table (B)

    Nr: Tool registration number ( =1〜Tool registration number )
    ※For multi tool control
      Kind of read data number attr Member at storage destination Range of value
      Small tool number Nm 0 u2data 0〜9999
      Small tool calculation angle Nm 1 s4data , decimal 0.0〜359.999 in case of IS-B
      Amount of Y axis tool position correction Nm 2 s4data , decimal Refer to standard parameter setting table (A)
      Tool shape for graphic drawing(C) Nm 3 u2data 0〜99
      Size of tool for graphic drawing(I) Nm 4 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nm 5 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nm 6 u4data , decimal 0.0〜359.999 in case of IS-B
      Radius of multi tool Nm 7 u4data , decimal Refer to standard parameter setting table (B)
      Amount of X axis tool position correction Nm 8 s4data , decimal Refer to standard parameter setting table (A)

    Nm: Tool registration number of the multi tool + 5000( =5001 to 5000+Items on the tool registration)
    When the Graphic function is invalid, the following items cannot be write regardless of the tool data setting function or the multi tool control function.
    ・Tool shape of graphic drawing(C)
    ・Tool size of graphic drawing(I)
    ・Tool size of graphic drawing(J)
    ・Tool size of graphic drawing(K)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB.
    EW_NUMBER Data number error
    Start number(number) is wrong.
    EW_ATTRIB data attribute error
    data attribute(attr) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rd2punchtl_ex

    Reads each tool registration data (registration number, tool punch frequency, and tool shape, etc.)corresponding to the tool registration number which specified.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd2punchtl_ex(unsigned short FlibHndl, IODBPUNCH2_EX *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    buf in/out

    Specifies a pointer of the IODBPUNCH2_EX structure which returns the various of tool registration data (the tool number, the tool punch frequency, and the tool shape, etc.).

    typedef struct iodbpunch2_ex {
        unsigned long   number ;            /* Data number(N)      */
        unsigned short  attr ;              /* Data attribute(M)   */
        union {
            unsigned short  u2data ;        /* Unsigned 2 bite     */
            short           s2data ;        /* Signed 2 bite       */
            unsigned long   u4data ;        /* Unsigned 4 bite     */
            long            s4data ;        /* Signed 4 bite       */
            unsigned long   u8data[2] ;     /* Unsigned 8 bite     */
        } u ;
        short           decimal ;           /* Decimal places      */
        short           reserve ;           /* Reserve             */
    } IODBPUNCH2_EX ;
    
    number
    Specify Tool number.
    attr
    Specify kind of Read data.
    buf.u
    The Read data is stored by each data form.
    The kind of the data number that can be specified, the data attribute , and the read data is shown in the following tables.
    (a) Without the tool data setting function
      Kind of read data number attr Member at storage destination Range of value
      Number of tools to use Nt 0 u2data 0〜136
      Punch frequency Nt 1 u4data 0〜65535
      Amount of compensation at tool position along X-axis Nt 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of compensation at tool position along Y-axis Nt 3 s4data , decimal Refer to standard parameter setting table (A)
      The position at which the turret is indexed Nt 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number in tool change Nt 5 u2data 0〜9999
      Tool life Nt 6 u4data 0〜65535
      Tool shape of graphic drawing(C) Nt 7 u2data 0〜99
      Tool size of graphic drawing(I) Nt 8 u4data , decimal Refer to standard parameter setting table (B)
      Tool size of graphic drawing(J) Nt 9 u4data , decimal Refer to standard parameter setting table (B)
      Tool angle of graphic drawing(K) Nt 10 u4data , decimal 0.0 - 359.999 in case of IS-B

    Nt: Tool number
    (b) With the tool data setting function
      Kind of read data number attr Member at storage destination Range of value
      Number of tools to use Nt 0 u2data/u4data 0〜99999999
      Punch frequency Nt 1 u2data/u4data 0〜999999999
      Amount of compensation at tool position along X-axis Nt 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of compensation at tool position along Y-axis Nt 3 s4data , decimal Refer to standard parameter setting table (A)
      The position at which the turret is indexed Nt 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number in tool change Nt 5 u2data/u4data 0〜99999999
      Tool life Nt 6 u2data/u4data 0〜999999999
      Tool shape of graphic drawing(C) Nt 7 u2data 0〜99
      Tool size of graphic drawing(I) Nt 8 u4data , decimal Refer to standard parameter setting table (B)
      Tool size of graphic drawing(J) Nt 9 u4data , decimal Refer to standard parameter setting table (B)
      Tool angle of graphic drawing(K) Nt 10 u4data , decimal 0.0 - 359.999 in case of IS-B
      Angle used for indexing the turret for the sub-tool Nt 11 s4data , decimal 0.0 - 359.999 in case of IS-B
      Radius of the multi tool Nt 12 u4data , decimal Refer to standard parameter setting table (B)

    When the Graphic function is invalid, the following items cannot be write regardless of the tool data setting function or the multi tool control function.
    ・Tool shape of graphic drawing(C)
    ・Tool size of graphic drawing(I)
    ・Tool size of graphic drawing(J)
    ・Tool size of graphic drawing(K)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB.
    EW_NUMBER Data number error
    Start number(number) is wrong.
    EW_ATTRIB data attribute error
    data attribute(attr) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdacttlzone

    Reads the actual tool zone data number and its data. The number and data are stored in each member of the ODBACTTLZN structure(user define type).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdacttlzone(unsigned short FlibHndl, ODBACTTLZN *acttlzn);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    acttlzn out

    Pointer to the ODBACTTLZN structure including the actual number and data for the tool zone. The ODBACTTLZN structure is as follows.

    typedef struct odbacttlzn {
        short   act_no;     /* Actual tool zone data number */
        long    data[2];    /* Actual tool zone data */
    } ODBACTTLZN ;
    
    act_no
    Actual tool zone data number is set. (1,..,12)
    data
    Actual tool zone data is set.
    data[0] : Item X
    data[1] : Item Y

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdmultitldt

    Reads the tool data for the multiple tool.
    The data is stored in each member of the IODBMLTTL structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmultitldt(unsigned short FlibHndl, short s_no, short *number, IODBMLTTL *mlttl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool registration number.

    1,..,(maximum tool registration number)

    number in/out

    Pointer to the number of multiple tool data.
    Specify the number of multiple tool data to be read before function call, and the number of multiple tool data being read actually is stored after the function call.

    mlttl out

    Pointer to the IODBMLTTL structure including the multiple tool data.
    The IODBMLTTL structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbmlttl {
        short   slct;       /* Flag of valid data */
        short   m_tl_no;    /* Sub-tool number */
        long    m_tl_radius;/* Radius of multiple tool */
        long    m_tl_angle; /* Angle of multiple tool */
        long    x_axis_ofs; /* X-axis offset */
        long    y_axis_ofs; /* Y-axis offset */
        char    tl_shape;   /* Tool shape(C) */
        long    tl_size_i;  /* Tool size(I) */
        long    tl_size_j;  /* Tool size(J) */
        long    tl_angle;   /* Tool angle(K) */
        long    reserve[7]; /* (reserve) */
    } IODBMLTTL ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbmlttl {
        short   slct;          /* Flag of valid data      */
        short   m_tl_no;       /* Sub-tool number         */
        long    m_tl_radius;   /* Radius of multiple tool */
        long    m_tl_angle;    /* Angle of multiple tool  */
        long    x_axis_ofs;    /* X-axis offset           */
        long    y_axis_ofs;    /* Y-axis offset           */
        char    tl_shape;      /* Tool shape(C)           */
        long    tl_size_i;     /* Tool size(I)            */
        long    tl_size_j;     /* Tool size(J)            */
        long    tl_angle;      /* Tool angle(K)           */
        char    m_radius_dec;  /* Decimals places         */
        char    m_angle_dec;   /* Decimals places         */
        char    x_axis_dec;    /* Decimals places         */
        char    y_axis_dec;    /* Decimals places         */
        char    tl_size_i_dec; /* Decimals places         */
        char    tl_size_j_dec; /* Decimals places         */
        char    tl_angle_dec;  /* Decimals places         */
        char    reserve;       /* (reserve)               */
        long    reserves[5];   /* (reserve)               */
    } IODBMLTTL ;
    
    slct
    Flag of valid data is set.
    bit 0 : Sub-tool number
    bit 1 : Radius of multiple tool
    bit 2 : Angle of multiple tool
    bit 3 : X-axis offset
    bit 4 : Y-axis offset
    bit 5 : Tool shape(C)
    bit 6 : Tool size(I)
    bit 7 : Tool size(J)
    bit 8 : Tool angle(K)
    bit 9,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    m_tl_no
    Sub-tool number of multiple tool is set. (0,..)
    m_tl_radius
    Radius of multiple tool is set.(valid with Tool data setting function)
    m_tl_angle
    Angle of multiple tool is set.
    x_axis_ofs
    X-axis offset is set.(valid with Tool data setting function)
    y_axis_ofs
    Y-axis offset is set.
    tl_shape
    Tool shape(C) is set.(valid with Graphic function)
    tl_size_i
    Tool size(I) is set.(valid with Graphic function)
    tl_size_j
    Tool size(J) is set.(valid with Graphic function)
    tl_angle
    Tool angle(K) is set.(valid with Graphic function)
    m_radius_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Radius of multiple tool is set.
    m_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Angle of multiple tool is set.
    x_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of X-axis offset is set.
    y_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Y-axis offset is set.
    tl_size_i_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(I) is set.
    tl_size_j_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(J) is set.
    tl_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(K) is set.
    The corresponding data is as follows.
      decimals places corresponding data
      m_radius_dec m_tl_radius
      m_angle_dec m_tl_angle
      x_axis_dec x_axis_ofs
      y_axis_dec y_axis_ofs
      tl_size_i_dec tl_size_i
      tl_size_j_dec tl_size_j
      tl_angle_dec tl_angle
    reserve
    (reserve)
    reserves
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The multiple tool function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdsafetyzone

    Reads the safety zone data.
    The data is stored in each member of the IODBSAFE structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsafetyzone(unsigned short FlibHndl, short s_no, short *number, IODBSAFE *safe);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start safety zone data number. (1,..,4)

    number in/out

    Pointer to the number of safety zone data.
    Specify the number of safety zone data to be read before function call, and the number of safety zone data being read actually is stored after the function call.

    safe out

    Pointer to the IODBSAFE structure including the safety zone data.
    The IODBSAFE structure is as follows.

    typedef struct iodbsafe {
        short   slct;       /* Flag of valid data */
        long    data[3];    /* Safety zone data */
    } IODBSAFE ;
    
    slct
    Flag of valid data is set.
    type A type B
    bit 0 Item X2 Item W
    bit 1 Item X1 Item X
    bit 2 Item Y Item Y
    bit 3,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    data
    Safety zone data is set.
    type A type B
    data[0] Item X2 Item W
    data[1] Item X1 Item X
    data[2] Item Y Item Y

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdsetzone

    Reads the number of safety zone which is set automatically.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdsetzone(unsigned short FlibHndl, short *setzone);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    setzone out

    Pointer to the variable for the number of automatic setting zone. (0,..,4)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdtlctldata

    Reads the tool control data.
    The data is stored in each member of the IODBTLCTL structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtlctldata(unsigned short FlibHndl, IODBTLCTL *tlctl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    tlctl out

    Pointer to the IODBTLCTL structure including the tool control data.
    The IODBTLCTL structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbtlctl {
        short   slct;          /* Flag of valid data */
        short   used_tool;     /* Number of used tool */
        short   turret_indx;   /* Number of turret index */
        long    zero_tl_no;    /* Zero point tool number */
        long    t_axis_move;   /* Turret axis movement */
        long    total_punch[2];/* Total number of punch operation*/
        short   reserve[11];   /* (reserve) */
    } IODBTLCTL ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbtlctl {
        short   slct;           /* Flag of valid data              */
        short   used_tool;      /* Number of used tool             */
        short   turret_indx;    /* Number of turret index          */
        long    zero_tl_no;     /* Zero point tool number          */
        long    t_axis_move;    /* Turret axis movement            */
        long    total_punch[2]; /* Total number of punch operation */
        char    t_axis_dec;     /* Decimals places                 */
        char    reserve;        /* (reserve)                       */
        short   reserves[10];   /* (reserve)                       */
    } IODBTLCTL ;
    
    
    slct
    Flag of valid data is set.
    bit 0 : Number of used tool
    bit 1 : Number of turret index
    bit 2 : Zero point tool number
    bit 3 : Turret axis movement
    bit 4 : Total number of punch operation
    bit 5,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.

    used_tool
    Number of used tool is set. (0,..)

    turret_indx
    Number of turret index is set. (0,..) (This must be fewer than number of used tool.)

    zero_tl_no
    Zero point tool number is set. (0,..)

    t_axis_move
    Turret axis movement is set.

    total_punch
    Total number of punch operation is set.
    ・Series 16i/18i-P
    total_punch[0] : Lower (0,..,99999999)
    total_punch[1] : Upper (0,..,99999999)
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    total_punch[0] : Lower (0,..,999999999)
    total_punch[1] : Upper (0,..,999999999)

    t_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Turret axis movement is set.
    The corresponding data is as follows.
      decimals places corresponding data
      t_axis_dec t_axis_move
    reserve
    (reserve)
    reserves
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdtooldata

    Reads the tool data.
    The data is stored in each member of the IODBTLDT structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtooldata(unsigned short FlibHndl, short s_no, short *number, IODBTLDT *tldt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool registration number.

    1,..,(maximum tool registration number)

    number in/out

    Pointer to the number of tool data.
    Specify the number of tool data to be read before function call, and the number of tool data being read actually is stored after the function call.

    tldt out

    Pointer to the IODBTLDT structure including the tool data.
    The IODBTLDT structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbtldt {
        short   slct;       /* Flag of valid data */
        long    tool_no;    /* Tool number */
        long    x_axis_ofs; /* X-axis offset */
        long    y_axis_ofs; /* Y-axis offset */
        long    turret_pos; /* Turret position */
        long    chg_tl_no;  /* Tool number to be changed */
        long    punch_count;/* Number of punch operation */
        long    tool_life;  /* Tool life */
        long    m_tl_radius;/* Radius of multiple tool */
        long    m_tl_angle; /* Angle of multiple tool */
        char    tl_shape;   /* Tool shape(C) */
        long    tl_size_i;  /* Tool size(I) */
        long    tl_size_j;  /* Tool size(J) */
        long    tl_angle;   /* Tool angle(K) */
        long    reserve[3]; /* (reserve) */
    } IODBTLDT ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbtldt {
        short   slct;         /* Flag of valid data        */
        long    tool_no;      /* Tool number               */
        long    x_axis_ofs;   /* X-axis offset             */
        long    y_axis_ofs;   /* Y-axis offset             */
        long    turret_pos;   /* Turret position           */
        long    chg_tl_no;    /* Tool number to be changed */
        long    punch_count;  /* Number of punch operation */
        long    tool_life;    /* Tool life                 */
        long    m_tl_radius;  /* Radius of multiple tool   */
        long    m_tl_angle;   /* Angle of multiple tool    */
        char    tl_shape;     /* Tool shape(C)             */
        long    tl_size_i;    /* Tool size(I)              */
        long    tl_size_j;    /* Tool size(J)              */
        long    tl_angle;     /* Tool angle(K)             */
        char    x_axis_dec;   /* Decimals places           */
        char    y_axis_dec;   /* Decimals places           */
        char    turret_dec;   /* Decimals places           */
        char    m_radius_dec; /* Decimals places           */
        char    m_angle_dec;  /* Decimals places           */
        char    tl_size_i_dec;/* Decimals places           */
        char    tl_size_j_dec;/* Decimals places           */
        char    tl_angle_dec; /* Decimals places           */
        short   reserve[2];   /* (reserve)                 */
    } IODBTLDT ;
    
    slct
    Flag of valid data is set.
    bit 0 : Tool number
    bit 1 : X-axis offset
    bit 2 : Y-axis offset
    bit 3 : Turret position
    bit 4 : Tool number to be changed
    bit 5 : Number of punch operation
    bit 6 : Tool life
    bit 7 : Radius of multiple tool
    bit 8 : Angle of multiple tool
    bit 9 : Tool shape(C)
    bit 10 : size(I)
    bit 11 : Tool size(J)
    bit 12 : Tool angle(K)
    bit 13,..,15 : (reserve)
    * When a bit is 0, it means the corresponding data has no meaning.
    tool_no
    Tool number is set. (0,..)
    x_axis_ofs
    X-axis offset is set.
    y_axis_ofs
    Y-axis offset is set.
    turret_pos
    Turret position is set.
    chg_tl_no
    Tool number to be changed is set. (0,..)
    punch_count
    Number of punch operation is set.(0,..,99999999)
    tool_life
    Tool life is set.(valid with Tool life management function)
    m_tl_radius
    Radius of multiple tool is set.
    (valid with Multiple tool function & Tool data setting function & 16282#5=0)
    m_tl_angle
    Angle of multiple tool is set.
    (valid with Multiple tool function & Tool data setting function & 16282#5=0)
    tl_shape
    Tool shape(C) is set. (valid with Graphic function)
    tl_size_i
    Tool size(I) is set.(valid with Graphic function)
    tl_size_j
    Tool size(J) is set.(valid with Graphic function)
    tl_angle
    Tool angle(K) is set.(valid with Graphic function)
    x_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of X-axis offset is set.
    y_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Y-axis offset is set.
    turret_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Turret position is set.
    m_radius_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Radius of multiple tool is set.
    m_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Angle of multiple tool is set.
    tl_size_i_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(I) tool is set.
    tl_size_j_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(J) tool is set.
    tl_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    decimals places of Tool size(K) tool is set.
    The corresponding data is as follows.
      decimals places corresponding data
      x_axis_dec x_axis_ofs
      y_axis_dec y_axis_ofs
      turret_dec turret_pos
      m_radius_dec m_tl_radius
      m_angle_dec m_tl_angle
      tl_size_i_dec tl_size_i
      tl_size_j_dec tl_size_j
      tl_angle_dec tl_angle

    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdtoolinfo

    Reads the tool information data(Maximum tool registration number and each size of tool data).
    The data is stored in each member of the ODBPTLINF structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtoolinfo(unsigned short FlibHndl, ODBPTLINF *tlinf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    tlinf out

    Pointer to the ODBPTLINF structure including the tool information.
    The ODBPTLINF structure is as follows.

    typedef struct odbptlinf {
        short   tld_max;     /* Maximun tool registration number of the tool data */
        short   mlt_max;     /* Maximun tool registration number of the multiple tool data */
        short   reserve      /* (reserve) */
        short   tld_size[16] /*  Size of the tool data */
        short   mlt_size[16] /*  Size of the multiple tool data */
        short   reserves[16] /* (reserve) */
    } ODBPTLINF ;
    
    tld_max
    Maximun tool registration number of the tool data is set.
    mlt_max
    Maximun tool registration number of the multiple tool data is set.
    reserve
    (reserve)
    tld_size
    Each size of the tool data(0,1,2,4 byte) is set as follows.
    tld_size Items of data size
    tld_size[0] Tool number
    tld_size[1] X-axis offset
    tld_size[2] Y-axis offset
    tld_size[3] Turret position
    tld_size[4] Tool number to be changed
    tld_size[5] Number of punch operation
    tld_size[6] Tool life
    tld_size[7] Radius of multiple tool
    tld_size[8] Angle of multiple tool
    tld_size[9] Tool shape(C)
    tld_size[10] Tool size(I)
    tld_size[11] Tool size(J)
    tld_size[12] Tool angle(K)
    tld_size[13],..,[15] (reserve)
    mlt_size
    Each size of the multiple tool data is set as follows. (0,1,2,4)
    mlt_size Items of data size
    mlt_size[0] Sub-Tool number
    mlt_size[1] Radius of multiple tool
    mlt_size[2] Angle of multiple tool
    mlt_size[3] X-axis offset
    mlt_size[4] YY-axis offset
    mlt_size[5] Tool shape(C)
    mlt_size[6] Tool size(I)
    mlt_size[7] Tool size(J)
    mlt_size[8] Tool angle(K)
    mlt_size [9],..,[15] (reserve)

    See the "OPERATOR'S MANUAL" and the "PARAMETER MANUAL" of CNC for details of the tool data setting function.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_NOOPT No option
    The extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_rdtoolzone

    Reads the tool zone data.
    The data is stored in each member of the IODBTLZN structure( user define type ).


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtoolzone(unsigned short FlibHndl, short s_no, short *number, IODBTLZN *tlzone);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool zone data number. (1,..,12)

    number in/out

    Pointer to the number of tool zone data.
    Specify the number of tool zone data to be read before function call, and the number of tool zone data being read actually is stored after the function call.

    tlzone out

    Pointer to the IODBTLZN structure including the tool zone data.
    The IODBTLZN structure is as follows.

    typedef struct iodbtlzn {
        short   slct;       /* Flag of valid data */
        long    data[2];    /* Tool zone data */
    } IODBTLZN ;
    
    slct
    Flag of valid data is set.
    bit 0 : Item X
    bit 1 : Item Y
    bit 2,..,15 : (not used)
    * When a bit is 0, it means the corresponding data has no meaning.
    data
    Tool zone data is set.
    data[0] : Item X
    data[1] : Item Y

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrmultitldt

    Writes the tool data for the multiple tool.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmultitldt(unsigned short FlibHndl, short s_no, short *number, IODBMLTTL *mlttl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool registration number.

    1,..,(maximum tool registration number)

    number in/out

    Pointer to the number of multiple tool data.
    Specify the number of multiple tool data to be written before function call, and the number of multiple tool data being written actually is stored after the function call.

    mlttl in

    Pointer to the IODBMLTTL structure including the multiple tool data.
    The IODBMLTTL structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbmlttl {
        short   slct;       /* Flag of data selection */
        short   m_tl_no;    /* Sub-tool number */
        long    m_tl_radius;/* Radius of multiple tool */
        long    m_tl_angle; /* Angle of multiple tool */
        long    x_axis_ofs; /* X-axis offset */
        long    y_axis_ofs; /* Y-axis offset */
        char    tl_shape;   /* Tool shape(C) */
        long    tl_size_i;  /* Tool size(I) */
        long    tl_size_j;  /* Tool size(J) */
        long    tl_angle;   /* Tool angle(K) */
        long    reserve[7]; /* (reserve) */
    } IODBMLTTL ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbmlttl {
        short   slct;          /* Flag of data selection  */
        short   m_tl_no;       /* Sub-tool number         */
        long    m_tl_radius;   /* Radius of multiple tool */
        long    m_tl_angle;    /* Angle of multiple tool  */
        long    x_axis_ofs;    /* X-axis offset           */
        long    y_axis_ofs;    /* Y-axis offset           */
        char    tl_shape;      /* Tool shape(C)           */
        long    tl_size_i;     /* Tool size(I)            */
        long    tl_size_j;     /* Tool size(J)            */
        long    tl_angle;      /* Tool angle(K)           */
        char    m_radius_dec;  /* Decimals places         */
        char    m_angle_dec;   /* Decimals places         */
        char    x_axis_dec;    /* Decimals places         */
        char    y_axis_dec;    /* Decimals places         */
        char    tl_size_i_dec; /* Decimals places         */
        char    tl_size_j_dec; /* Decimals places         */
        char    tl_angle_dec;  /* Decimals places         */
        char    reserve;       /* (reserve)               */
        long    reserves[5];   /* (reserve)               */
    } IODBMLTTL ;
    
    slct
    Flag of data selection must be set.
    bit 0 : Sub-tool number
    bit 1 : Radius of multiple tool
    bit 2 : Angle of multiple tool
    bit 3 : X-axis offset
    bit 4 : Y-axis offset
    bit 5 : Tool shape(C)
    bit 6 : Tool size(I)
    bit 7 : Tool size(J)
    bit 8 : Tool angle(K)
    bit 9,..,15 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    m_tl_no
    Specify Sub-tool number of multiple tool.(0,..)
    m_tl_radius
    Specify Radius of multiple tool.(valid with Tool data setting function)
    m_tl_angle
    Specify Angle of multiple tool.
    x_axis_ofs
    Specify X-axis offset.(valid with Tool data setting function)
    y_axis_ofs
    Specify Y-axis offset.
    tl_shape
    Specify Tool shape(C).(valid with Graphic function)
    tl_size_i
    Specify Tool size(I).(valid with Graphic function)
    tl_size_j
    Specify Tool size(J).(valid with Graphic function)
    tl_angle
    Specify Tool angle(K).(valid with Graphic function)
    m_radius_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Radius of multiple tool.
    m_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Angle of multiple tool.
    x_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of X-axis offset.
    y_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Y-axis offset.
    tl_size_i_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(I).
    tl_size_j_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(J).
    tl_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(K).
    The corresponding data is as follows.
      decimals places corresponding data
      m_radius_dec m_tl_radius
      m_angle_dec m_tl_angle
      x_axis_dec x_axis_ofs
      y_axis_dec y_axis_ofs
      tl_size_i_dec tl_size_i
      tl_size_j_dec tl_size_j
      tl_angle_dec tl_angle
    reserve
    (reserve)
    reserves
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The multiple tool data is wrong.
    In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    1 : Error of Sub-tool number
    2 : Error of Radius of multiple tool
    3 : Error of Angle of multiple tool
    4 : Error of X-axis offset
    5 : Error of Y-axis offset
    6 : Error of Tool shape(C)
    7 : Error of Tool size(I)
    8 : Error of Tool size(J)
    9 : Error of Tool angle(K)
    And the tool registration number which an error occurred will be set onto the member, err_dtno( nErr_dtno ) of ODBERR.
    EW_NOOPT No option
    The multiple tool function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrpunchtl_ex

    Writes each tool registration data (registration number, tool punch frequency, and tool shape, etc.)corresponding to the tool registration number which specified.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpunchtl_ex(unsigned short FlibHndl, short len, IODBPUNCH1_EX *buf);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    len in

    Specifies size of data to write (= 8 + (one of 2, 4 and 8)).

    buf in/out

    Specifies a pointer of the IODBPUNCH1_EX structure which sets the various of tool registration data (the tool number, the tool punch frequency, and the tool shape, etc.).

    typedef struct iodbpunch1_ex {
        unsigned short  number ;            /* Data number(N)      */
        unsigned short  attr ;              /* Data attribute(M)   */
        union {
            unsigned short  u2data ;        /* Unsigned 2 bite     */
            short           s2data ;        /* Signed 2 bite       */
            unsigned long   u4data ;        /* Unsigned 4 bite     */
            long            s4data ;        /* Signed 4 bite       */
            unsigned long   u8data[2] ;     /* Unsigned 8 bite     */
        } u ;
        short           decimal ;           /* Decimal places      */
        short           reserve ;           /* Reserve             */
    } IODBPUNCH1_EX ;
    
    number
    Specify Tool registration number .
    attr
    Specify kind of Write data.
    buf.u
    The Write data is stored by each data form.
    The kind of the data number that can be specified, the data attribute , and the write data is shown in the following tables.
    (a) Without the tool data setting function
      Kind of write data number attr Member at storage destination Range of value
      Number of use tools 0 0 u2data 0〜136
      Number of turret calculations 0 1 u2data 0〜136
      Starting point tool number 0 2 u2data 0〜9999
      Amount of turret axis movement 0 3 u4data , decimal Refer to standard parameter setting table (B)
      Total punch frequency 0 4 u8data 0〜999999999999999999
      Tool number Nr 0 u2data 0〜9999
      Punch number Nr 1 u4data 0〜65535
      Amount of X axis tool position correction Nr 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of Y axis tool position correction Nr 3 s4data , decimal Refer to standard parameter setting table (A)
      Turret calculation position Nr 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number for tool change Nr 5 u2data 0〜9999
      Tool life Nr 6 u4data 0〜65535
      Tool shape for graphic drawing(C) Nr 7 u2data 0〜99
      Size of tool for graphic drawing(I) Nr 8 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nr 9 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nr 10 u4data , decimal IS-Bの場合、0.0〜359.999

    Nr: Tool registration number ( =1〜136 )
    ※For multi tool control
      Kind of write data number attr Member at storage destination Range of value
      Small tool number Nm 0 u2data 0〜9999
      Small tool calculation angle Nm 1 s4data , decimal 0.0-359.999 in case of IS-B
      Amount of Y axis tool position correction Nm 2 s4data , decimal Refer to standard parameter setting table (A)
      Tool shape for graphic drawing(C) Nm 3 u2data 0〜99
      Size of tool for graphic drawing(I) Nm 4 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nm 5 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nm 6 u4data , decimal 0.0〜359.999 in case of IS-B

    Nm: Multitool tool registration number + 200( =201〜264 )
    (b) With the tool data setting function
      Kind of write data number attr Member at storage destination Range of value
      Number of use tools 0 0 u2data 0〜9999
      Number of turret calculations 0 1 u2data 0〜9999
      Starting point tool number 0 2 u2data/u4data 0〜99999999
      Amount of turret axis movement 0 3 u4data , decimal Refer to standard parameter setting table (B)
      Total punch frequency 0 4 u8data 0〜999999999999999999
      Tool number Nr 0 u2data/u4data 0〜99999999
      Punch number Nr 1 u2data/u4data 0〜999999999
      Amount of X axis tool position correction Nr 2 s4data , decimal Refer to standard parameter setting table (A)
      Amount of Y axis tool position correction Nr 3 s4data , decimal Refer to standard parameter setting table (A)
      Turret calculation position Nr 4 u4data , decimal Refer to standard parameter setting table (B)
      Tool number for tool change Nr 5 u2data/u4data 0〜99999999
      Tool life Nr 6 u2data/u4data 0〜999999999
      Tool shape for graphic drawing(C) Nr 7 u2data 0〜99
      Size of tool for graphic drawing(I) Nr 8 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nr 9 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nr 10 u4data , decimal 0.0〜359.999 in case of IS-B
      Small tool calculation angle Nr 11 s4data , decimal 0.0〜359.999 in case of IS-B
      Radius of multi tool Nr 12 u4data , decimal Refer to standard parameter setting table (B)

    Nr: Tool registration number ( =1〜Tool registration number )
    It is possible to use the tool registration number to write as tool data up to No. 5000, When the multi tool control function is valid and parameter CMT (No.16282#5) is "1" .
    ※For multi tool control
      Kind of write data number attr Member at storage destination Range of value
      Small tool number Nm 0 u2data 0〜9999
      Small tool calculation angle Nm 1 s4data , decimal 0.0〜359.999 in case of IS-B
      Amount of Y axis tool position correction Nm 2 s4data , decimal Refer to standard parameter setting table (A)
      Tool shape for graphic drawing(C) Nm 3 u2data 0〜99
      Size of tool for graphic drawing(I) Nm 4 u4data , decimal Refer to standard parameter setting table (B)
      Size of tool for graphic drawing(J) Nm 5 u4data , decimal Refer to standard parameter setting table (B)
      Angle of tool for graphic drawing(K) Nm 6 u4data , decimal 0.0〜359.999 in case of IS-B
      Radius of multi tool Nm 7 u4data , decimal Refer to standard parameter setting table (B)
      Amount of X axis tool position correction Nm 8 s4data , decimal Refer to standard parameter setting table (A)

    Nm: Tool registration number of the multi tool + 5000( =5001 to 5000+Items on the tool registration)
    When the Graphic function is invalid, the following items cannot be write regardless of the tool data setting function or the multi tool control function.
    ・Tool shape of graphic drawing(C)
    ・Tool size of graphic drawing(I)
    ・Tool size of graphic drawing(J)
    ・Tool size of graphic drawing(K)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 30i/31i-LB, 30i/31i-PB.
    EW_NUMBER Data number error
    Start number(number) is wrong.
    EW_ATTRIB data attribute error
    data attribute(attr) is wrong.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrsafetyzone

    Writes the safety zone data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrsafetyzone(unsigned short FlibHndl, short s_no, short *number, IODBSAFE *safe);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start safety zone data number. (1,..,4)

    number in/out

    Pointer to the number of safety zone data.
    Specify the number of safety zone data to be written before function call, and the number of safety zone data being written actually is stored after the function call.

    safe in

    Pointer to the IODBSAFE structure including the safety zone data.
    The IODBSAFE structure is as follows.

    typedef struct iodbsafe {
        short   slct;       /* Flag of data selection */
        long    data[3];    /* Safety zone data */
    } IODBSAFE ;
    
    slct
    Flag of data selection must be set.
    type A type B
    bit 0 Item X2 Item W
    bit 1 Item X1 Item X
    bit 2 Item Y Item Y
    bit 3,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    data
    Safety zone data.
    type A type B
    data[0] Item X2 Item W
    data[1] Item X1 Item X
    data[2] Item Y Item Y

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    err_no type A type B
    1 Error of Item X2 Error of Item W
    2 Error of Item X1 Error of Item X
    3 Error of Item Y Error of Item Y
    And the safety zone data number which an error occurred will be set onto the member, err_dtno( nErr_dtno ) of ODBERR.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrsetzone

    Writes the number of safety zone which is set automatically.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrsetzone(unsigned short FlibHndl, short setzone);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    setzone in

    Specify the number of automatic setting zone. (0,..,4)


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_DATA Data error
    The number of automatic setting zone(setzone) is wrong.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrtlctldata

    Writes the tool control data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtlctldata(unsigned short FlibHndl, IODBTLCTL *tlctl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    tlctl in

    Pointer to the IODBTLCTL structure including the tool control data.
    The IODBTLCTL structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbtlctl {
        short   slct;          /* Flag of data selection */
        short   used_tool;     /* Number of used tool */
        short   turret_indx;   /* Number of turret index */
        long    zero_tl_no;    /* Zero point tool number */
        long    t_axis_move;   /* Turret axis movement */
        long    total_punch[2];/* Total number of punch operation*/
        short   reserve[11];   /* (reserve) */
    } IODBTLCTL ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbtlctl {
        short   slct;          /* Flag of data selection          */
        short   used_tool;     /* Number of used tool             */
        short   turret_indx;   /* Number of turret index          */
        long    zero_tl_no;    /* Zero point tool number          */
        long    t_axis_move;   /* Turret axis movement            */
        long    total_punch[2];/* Total number of punch operation */
        char    t_axis_dec;    /* Decimals places                 */
        char    reserve;       /* (reserve)                       */
        short   reserves[10];  /* (reserve)                       */
    } IODBTLCTL ;
    
    
    slct
    Flag of data selection must be set.
    bit 0 : Number of used tool
    bit 1 : Number of turret index
    bit 2 : Zero point tool number
    bit 3 : Turret axis movement
    bit 4 : Total number of punch operation
    bit 5,..,15 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.

    used_tool
    Specify Number of used tool. (0,..)

    turret_indx
    Specify Number of turret index. (0,..)
    (This must be fewer than number of used tool.)

    zero_tl_no
    Specify Zero point tool number. (0,..)

    t_axis_move
    Specify Turret axis movement.

    total_punch
    Specify Total number of punch operation.
    ・Series 16i/18i-P
    total_punch[0] : Lower (0,..,99999999)
    total_punch[1] : Upper (0,..,99999999)
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    total_punch[0] : Lower (0,..,999999999)
    total_punch[1] : Upper (0,..,999999999)

    t_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Turret axis movement.
    The corresponding data is as follows.
      decimals places corresponding data
      t_axis_dec t_axis_move
    reserve
    (reserve)
    reserves
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_DATA Data error
    The tool control data is wrong.
    In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    1 : Error of Number of used tool
    2 : Error of Number of turret index
    3 : Error of Zero point tool number
    4 : Error of Turret axis movement
    5 : Error of Total number of punch operation
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrtooldata

    Writes the tool data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtooldata(unsigned short FlibHndl, short s_no, short *number, IODBTLDT *tldt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool registration number.

    1,..,(maximum tool registration number)

    number in/out

    Pointer to the number of tool data.
    Specify the number of tool data to be written before function call, and the number of tool data being written actually is stored after the function call.

    tldt in

    Pointer to the IODBTLDT structure including the tool data.
    The IODBTLDT structure is as follows.

    ・Series 16i/18i-P
    typedef struct iodbtldt {
        short   slct;       /* Flag of data selection */
        long    tool_no;    /* Tool number */
        long    x_axis_ofs; /* X-axis offset */
        long    y_axis_ofs; /* Y-axis offset */
        long    turret_pos; /* Turret position */
        long    chg_tl_no;  /* Tool number to be changed */
        long    punch_count;/* Number of punch operation */
        long    tool_life;  /* Tool life */
        long    m_tl_radius;/* Radius of multiple tool */
        long    m_tl_angle; /* Angle of multiple tool */
        char    tl_shape;   /* Tool shape(C) */
        long    tl_size_i;  /* Tool size(I) */
        long    tl_size_j;  /* Tool size(J) */
        long    tl_angle;   /* Tool angle(K) */
        long    reserve[3]; /* (reserve) */
    } IODBTLDT ;
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB
    typedef struct iodbtldt {
        short   slct;         /* Flag of data selection    */
        long    tool_no;      /* Tool number               */
        long    x_axis_ofs;   /* X-axis offset             */
        long    y_axis_ofs;   /* Y-axis offset             */
        long    turret_pos;   /* Turret position           */
        long    chg_tl_no;    /* Tool number to be changed */
        long    punch_count;  /* Number of punch operation */
        long    tool_life;    /* Tool life                 */
        long    m_tl_radius;  /* Radius of multiple tool   */
        long    m_tl_angle;   /* Angle of multiple tool    */
        char    tl_shape;     /* Tool shape(C)             */
        long    tl_size_i;    /* Tool size(I)              */
        long    tl_size_j;    /* Tool size(J)              */
        long    tl_angle;     /* Tool angle(K)             */
        char    x_axis_dec;   /* Decimals places           */
        char    y_axis_dec;   /* Decimals places           */
        char    turret_dec;   /* Decimals places           */
        char    m_radius_dec; /* Decimals places           */
        char    m_angle_dec;  /* Decimals places           */
        char    tl_size_i_dec;/* Decimals places           */
        char    tl_size_j_dec;/* Decimals places           */
        char    tl_angle_dec; /* Decimals places           */
        short   reserve[2];   /* (reserve)                 */
    } IODBTLDT ;
    
    slct
    Flag of data selection must be set.
    bit 0 : Tool number
    bit 1 : X-axis offset
    bit 2 : Y-axis offset
    bit 3 : Turret position
    bit 4 : Tool number to be changed
    bit 5 : Number of punch operation
    bit 6 : Tool life
    bit 7 : Radius of multiple tool
    bit 8 : Angle of multiple tool
    bit 9 : Tool shape(C)
    bit 10 : Tool size(I)
    bit 11 : Tool size(J)
    bit 12 : Tool angle(K)
    bit 13,..,15 : (reserve)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    tool_no
    Specify Tool number. (0,..)
    x_axis_ofs
    Specify X-axis offset.
    y_axis_ofs
    Specify Y-axis offset.
    turret_pos
    Specify Turret position.
    chg_tl_no
    Specify Tool number to be changed. (0,..)
    punch_count
    Specify Number of punch operation.(0,..,99999999)
    tool_life
    Specify Tool life.(valid with Tool life management function)
    m_tl_radius
    Specify Radius of multiple tool.
    (valid with Multiple tool function & Tool data setting function & 16282#5=0)
    m_tl_angle
    Specify Angle of multiple tool.
    (valid with Multiple tool function & Tool data setting function & 16282#5=0)
    tl_shape
    Specify Tool shape(C).(valid with Graphic function)
    tl_size_i
    Specify Tool size(I).(valid with Graphic function)
    tl_size_j
    Specify Tool size(J).(valid with Graphic function)
    tl_angle
    Specify Tool angle(K).(valid with Graphic function)
    x_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of X-axis offset .
    y_axis_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Y-axis offset.
    turret_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Turret position.
    m_radius_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Radius of multiple tool.
    m_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Angle of multiple tool.
    tl_size_i_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(I) tool.
    tl_size_j_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(J) tool.
    tl_angle_dec
    ・Series 0i-PD/PF, 30i/31i-LB, 30i/31i-PB only
    Specify decimals places of Tool size(K) tool.
    The corresponding data is as follows.
      decimals places corresponding data
      x_axis_dec x_axis_ofs
      y_axis_dec y_axis_ofs
      turret_dec turret_pos
      m_radius_dec m_tl_radius
      m_angle_dec m_tl_angle
      tl_size_i_dec tl_size_i
      tl_size_j_dec tl_size_j
      tl_angle_dec tl_angle

    reserve
    (reserve)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The tool data is wrong.
    In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    1 : Error of Tool number
    2 : Error of X-axis offset
    3 : Error of Y-axis offset
    4 : Error of Turret position
    5 : Error of Tool number to be changed
    6 : Error of Number of punch operation
    7 : Error of Tool life
    8 : Error of Radius of multiple tool
    9 : Error of Angle of multiple tool
    10 : Error of Tool shape(C)
    11 : Error of Tool size(I)
    12 : Error of Tool size(J)
    13 : Error of Tool angle(K)
    And the tool registration number which an error occurred will be set onto the member, err_dtno( nErr_dtno ) of ODBERR.
    EW_NOOPT No option
    The extended driver/library function is necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    punch\cnc_wrtoolzone

    Writes the tool zone data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtoolzone(unsigned short FlibHndl, short s_no, short *number, IODBTLZN *tlzone);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    s_no in

    Specify the start tool zone data number. (1,..,12)

    number in/out

    Pointer to the number of tool zone data.
    Specify the number of tool zone data to be written before function call, and the number of tool zone data being written actually is stored after the function call.

    tlzone in

    Pointer to the IODBTLZN structure including the tool zone data.
    The IODBTLZN structure is as follows.

    typedef struct iodbtlzn {
        short   slct;       /* Flag of data selection */
        long    data[2];    /* Tool zone data */
    } IODBTLZN ;
    
    slct
    Flag of data selection must be set.
    bit 0 : Item X
    bit 1 : Item Y
    bit 2,..,15 : (not used)
    * In order to write the data to CNC, turn on the corresponding bit on this data.
    data
    Tool zone data.
    data[0] : Item X
    data[1] : Item Y

    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function cannot be used except 0i-PD/PF, 16i/18i-P, 30i/31i-LB, 30i/31i-PB.
    EW_LENGTH Data block length error
    Number of data(number) is wrong.
    EW_NUMBER Data number error
    Start number(s_no) is wrong.
    EW_DATA Data error
    The tool zone data(data) is wrong.
    In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    1 : Error of Item X
    2 : Error of Item Y
    And the tool zone data number which an error occurred will be set onto the member, err_dtno( nErr_dtno ) of ODBERR.
    EW_NOOPT No option
    The safety zone check function and the extended driver/library function are necessary.
    It is necessary to set Punch press function option and Parameter ALA(No.16242#0).(30i/31i-LB only)

    servo\cnc_svdtendrd

    Terminates reading the servo learning data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtendrd(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_svdtstartrd function has not been executed.
    EW_DATA The error occurred during reading the servo learning data from the servo side.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
    EW_REJECT The servo learning data during reading.

    servo\cnc_svdtendwr

    Terminates writing the servo learning data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtendwr(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_BUSY The servo learning data during writing.
    EW_FUNC cnc_svdtstartwr function has not been executed.
    EW_DATA The error occurred during writing the servo learning data to the servo side.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.

    servo\cnc_svdtrddata

    Reads the servo learning data from the I/F buffer for reading/writing the servo learning data.

    In 30i/31i/32i, because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed. So, even if the error occurs, the result might be normal(Return value = EW_OK and stat=3:Reading end). Confirm the transfer result of cnc_svdtendrd() after executing this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtrddata(unsigned short FlibHndl,short *stat,long *length,void *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stat in Pointer to the variable for state of reading. The state of reading the servo learning data is stored.
    1 : During reading
    3 : Reading end
    length in

    Pointer to the variable for data length.
    Specify the data length (byte unit) in the variable. After executing this function, the size of data which was read actually is set. The maximum data length which can be read at a time is 65535 bytes.

    data out

    Pointer to the variable for servo learning data.
    The pointer of the variable to store the data read from the I/F buffer is specified.


    ERRORS

    Code Description
    EW_FUNC cnc_svdtstartrd function has not been executed.
    EW_LENGTH data length error
    Data length(length) is wrong.
    EW_DATA The error occurred during reading the servo learning data from the servo side.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
    EW_BUFFER The buffer is empty
    Because the processing of the data transfer on the CNC side is late, the data is not read.

    servo\cnc_svdtstartrd

    Starts reading the servo learning data of the axis specified by "axis".

    After this function is executed, the data is stored in the I/F buffer in CNC. Get the operation data in data buffer by using the cnc_svdtrddata function.

    In 30i/31i/32i, same I/F as the uploading and downloading is used. So, this function cannot be executed during the uploading and downloading.

    The procedure to read the data is shown as follows.

    * Please refer to "Self-learning control operation manual" for the handling of the servo learning data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtstartrd(unsigned short FlibHndl,short axis);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in
  • Series 16/18, 16i/18i
    • Specify axis number to read. Range of the data are from 1 to n.
      (n : number of controlled axis)
  • Series 30i/31i/32i
    • Specify all axes(-1). (Each axis cannot be specified.)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in Specify all axes(-1). (Each axis cannot be specified.)

    ERRORS

    Code Description
    EW_BUSY Busy(30i/31i/32i only)
    The uploading or downloading function is executing.
    EW_ATTRIB data attribute error
    The specification of axis number(axis) is improper.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
    EW_REJECT The servo learning data during reading/writing.

    servo\cnc_svdtstartwr

    Starts writing the servo learning data of the axis specified by "axis".

    After this function is executed, the written data is set in the I/F buffer in CNC by using the cnc_svdtrddata function.

    In 30i/31i/32i, same I/F as the uploading and downloading is used. So, this function cannot be executed during the uploading and downloading.

    The procedure to write the data is shown as follows.

    * Please refer to "Self-learning control operation manual" for the handling of the servo learning data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtstartwr(unsigned short FlibHndl,short axis);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in
  • Series 16/18, 16i/18i
    • Specify axis number to write. Range of the data are from 1 to n.
      (n : number of controlled axis)
  • Series 30i/31i/32i
    • Specify all axes(-1). (Each axis cannot be specified.)
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in Specify all axes(-1). (Each axis cannot be specified.)

    ERRORS

    Code Description
    EW_BUSY Busy(30i/31i/32i only)
    The uploading or downloading function is executing.
    EW_ATTRIB data attribute error
    The specification of axis number(axis) is improper.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
    EW_REJECT The servo learning data during reading/writing.

    servo\cnc_svdtstopexec

    Stops processing of reading/writing of servo learning data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtstopexec(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.


    ERRORS

    Code Description
    EW_FUNC cnc_svdtstartrd or cnc_svdtstartwr function has not been executed.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.

    servo\cnc_svdtwrdata

    Writes the servo learning data to the I/F buffer for reading/writing the servo learning data.

    In 30i/31i/32i, because importance is attached to the speed of data transfer to the CNC, in general, return of errors(EW_DATA, etc.) may be delayed. So, even if the error occurs, the result might be normal(Return value = EW_OK and stat=4:Writing end). Confirm the transfer result of cnc_svdtendwr() after executing this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_svdtwrdata(unsigned short FlibHndl,short *stat,long *length,void *data);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    stat in Pointer to the variable for the state of writing. The state of writing the servo learning data is stored.
    2 : During writing
    4 : Writing end
    length in/out

    Pointer to the variable for data length.
    Specify the data length (byte unit) in the variable. After executing this function, the size of data which was written actually is set.

    data in

    Pointer to the variable for servo learning data.
    Specify the pointer of the variable where the data written to the I/F buffer is stored.


    ERRORS

    Code Description
    EW_FUNC cnc_svdtstartwr function has not been executed.
    EW_LENGTH data length error
    Data length(length) is wrong.
    EW_DATA The error occurred during writing the servo learning data to the servo side.
    EW_NOOPT no option
    Learning control and Memory expension for learning control or Learning control for parts cutting and the extended driver/library function are necessary.
    EW_BUFFER The buffer is full
    Because the processing of the data transfer on the CNC side is late, the data is not write.

    toolgeom\cnc_rdtlgeomsize_ext

    This function reads the tool geometry size data within the range specified by "s_number" and "data_num".
    The tool geometry size data is sequentially read one by one.
    If the error occurs, the reading process thereafter is discontinued.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtlgeomsize_ext( unsigned short FlibHndl, short coord, short s_number, short *data_num, IODBTLGSEXT *tlgsext );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    coord in

    Specify the program coordinate system.
    When the tool offset switching function is invalid, this value is ignored.

    0 Coordinate-1
    1 Coordinate-2
    s_number in

    Specify the data number in which reading is started.

    data_num in/out

    The pointer to the number of reading data.
    The tool geometry size data that belongs to one data number is counted by the set with one reading number.
    Set the number of reading data to the data specified with the pointer beforehand.
    The tool geometry size data of the number of "*data_num" are read from the data number which is specified by "s_number".
    The number of data actually read is returned to "*data_num" when the execution of this function ends.

    tlgsext out

    The pointer to the structure that storage the tool geometry size data.
    The IODBTLGSEXT structure is as follows.

    typedef struct iodbtlgsext{
        long    data1;          /* Data1         */
        long    data2;          /* Data2         */
        long    data3;          /* Data3         */
        long    data4;          /* Data4         */
        char    tooltype;       /* Tool type     */
        char    install;        /* Attachment    */
        char    holder;         /* Holder number */
        char    toolname[9];    /* Tool name     */
    } IODBTLGSEXT;
    
    data1
    The value of tool data 1 is returned.
    In the case of "vacant", "0x7FFFFFFF" returns.
    data2
    The value of tool data 2 is returned.
    In the case of "vacant", "0x7FFFFFFF" returns.
    data3
    The value of tool data 3 is returned.
    In the case of "vacant", "0x7FFFFFFF" returns.
    data4
    The value of tool data 4 is returned.
    In the case of "vacant", "0x7FFFFFFF" returns.
    tooltype
    Kind of tool is returned.
    Tool type is as follows.
    0 Tool is not defined.
    10 General-purpose tool
    11 Threading tool
    12 Grooving tool
    13 Round-nose tool
    14 Point nose straight tool
    15 Versatile tool
    20 Drill
    21 Counter sink tool
    22 Flat end mill
    23 Ball end mill
    24 Tap
    25 Reamer
    26 Boring tool
    27 Face mill
    install
    Attachment value is returned.
    The setting range is different depending on the kind of the tool.
    In case of "0", the value of the attachment is not set.
    General-purpose tool 0-16
    Threading tool 0-16
    Grooving tool 0-16
    Round-nose tool 0-16
    Point nose straight tool 0-12
    Versatile tool 0-16
    Drill 0-4
    Counter sink tool 0-4
    Flat end mill 0-4
    Ball end mill 0-4
    Tap 0-4
    Reamer 0-4
    Boring tool 0-4
    Face mill 0-4
    holder
    Holder number is returned.
    The setting range is as follows.
    1 path system 0-120
    2 path systems 0-60
    3 path sysyems 0-40
    4 path systems 0-30
    toolname out

    Tool name is returned. NULL is set to the end of the character string.


    ERRORS

    Code Description
    EW_LENGTH Reading number(data_num) is wrong.
    EW_NUMBER Reading start number(s_number) is wrong.
    EW_ATTRIB Program coordinate system value(coord) is wrong.
    EW_NOOPT No option.
    Tool geometry size data 100-pairs or 300-pairs is necessary.

    toolgeom\cnc_wrtlgeomsize_ext

    This function writes / deletes the tool geometry size data within the range specified by "s_number" and "data_num".
    The tool geometry size data is sequentially written / deleted one by one.
    If the error occurs, the writing process thereafter is discontinued.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtlgeomsize_ext( unsigned short FlibHndl, short coord, short type, short s_number, short *data_num, IODBTLGSEXT *tlgsext );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    coord in

    Specify the program coordinate system.
    When the tool offset switching function is invalid, this value is ignored.

    0 Coordinate-1
    1 Coordinate-2
    type in

    Specify the type of written / deleted tool geometry size data.
    The relation between the type and the setting data is as follows.

    0 All data
    1 Data1
    2 Data2
    3 Kind of the tool
    4 Attachment
    5 Attachment
    6 Data3
    7 Data4
    8 Holder number
    s_number in

    Specify the data number in which writing / deleting tool geometry size data is started.

    data_num in/out

    The pointer to the number of writing / deleting data.
    The tool geometry size data that belongs to one data number is counted by the set with one writing / deleting number.
    Set the number of writing/deleting data to the data specified with the pointer beforehand.
    The tool geometry size data of the number of "*data_num" are written / deleted from the data number which is specified by "s_number".
    The number of data actually written / deleted is returned to "*data_num" when the execution of this function ends.

    tlgsext out

    The pointer to the structure that storage the tool geometry size data.
    IODBTLGSEXT structure is as follows.

    typedef struct iodbtlgsext{
        long    data1;          /* Data1         */
        long    data2;          /* Data2         */
        long    data3;          /* Data3         */
        long    data4;          /* Data4         */
        char    tooltype;       /* Tool type     */
        char    install;        /* Attachment    */
        char    holder;         /* Holder number */
        char    toolname[9];    /* Tool name     */
    } IODBTLGSEXT;
    
    data1
    Specify the value of tool data1.
    In the case of "vacant", "0x7FFFFFFF" is specified.
    data2
    Specify the value of tool data2.
    In the case of "vacant", "0x7FFFFFFF" is specified.
    data3
    Specify the value of tool data3.
    In the case of "vacant", "0x7FFFFFFF" is specified.
    data4
    Specify the value of tool data4.
    In the case of "vacant", "0x7FFFFFFF" is specified.
    tooltype
    Specify the kind of tool
    Specify "type=3(Kind of the tool)" and "tooltype=0" to delete the tool geometry size data.
    Kind of the tool is as follows.
    0 Delete the tool geometry size data
    10 General-purpose tool
    11 Threading tool
    12 Grooving tool
    13 Round-nose tool
    14 Point nose straight tool
    15 Versatile tool
    20 Drill
    21 Counter sink tool
    22 Flat end mill
    23 Ball end mill
    24 Tap
    25 Reamer
    26 Boring tool
    27 Face mill
    install
    Specify the attachment value.
    The setting range is different depending on the kind of the tool.
    Specify "0", in case of the value of attachment is not set.
    General-purpose tool 0-16
    Threading tool 0-16
    Grooving tool 0-16
    Round-nose tool 0-16
    Point nose straight tool 0-12
    Versatile tool 0-16
    Drill 0-4
    Counter sink tool 0-4
    Flat end mill 0-4
    Ball end mill 0-4
    Tap 0-4
    Reamer 0-4
    Boring tool 0-4
    Face mill 0-4
    holder
    Specify the holder number.
    The setting range is as follows.
    1 path system 0-120
    2 path systems 0-60
    3 path sysyems 0-40
    4 path systems 0-30
    toolname out

    Specify the name of the tool.
    Specify NULL for the end of the character string.


    ERRORS

    Code Description
    EW_LENGTH Writing / deleting number(data_num) is wrong.
    EW_NUMBER Writing / deleting start number(s_number) is wrong.
    or the data effective number is over.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 error except EW_NUMBER
    1 Writing / deleting start number(s_number) is wrong.
    2 the data effective number is over.
    EW_ATTRIB Program coordinate system(coord) or type(type) is wrong.
    EW_DATA The member in the ODBTLGSEXT structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 error except EW_DATA
    1 "data1" is wrong.
    2 "data2" is wrong.
    3 "tooltype" is wrong.
    4 "install" is wrong.
    5 "toolname" is wrong.
    6 "data3" is wrong.
    7 "data4" is wrong.
    8 "holder"
    EW_NOOPT No option.
    Tool geometry size data 100-pairs or 300-pairs are necessary.
    EW_PROT Write protection.
    Tool geometry size data is protected for writing.

    toollife\cnc_clrcntinfo

    Clear the tool life counter and the tool information.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_clrcntinfo(unsigned short FlibHndl,short grpno_s,short grpno_e);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grpno_s in

    Specify the start tool group number.

    grpno_e in

    Specify the end tool group number.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number (grpno_s,grpno_e) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group. In order to get more information for this err_no return value, execute cnc_getdtailerr function. Wrong tool group number will be set onto the member of err_dtno of OBDERR structure.(30i, 0i-D/F only)

    toollife\cnc_deltlifedt

    Deletes the tool data. When the tool data is deleted, all subsequent tool data is shifted up to fill the deleted space, as shown below.

    This function is not available for T/TT system.(except 30i series, 0i-D/F)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_deltlifedt(unsigned short FlibHndl,short grp_num,short ent_num);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    ent_num in

    Specify the tool use-order number.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number(ent_num) is wrong.
    EW_DATA data error(30i/31i/32i, 0i-D/F only)
    The specification of tool number(data) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    5 : Automatic operation
    6 : Used next group or current used group
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_deltlifegrp

    Delete the tool group. All information on the specified group is cleared.

    This function is not available for Series 15 T/TT, 15i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_deltlifegrp(unsigned short FlibHndl,short number);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool group number.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(number) is wrong.
    EW_DATA data error(30i/31i/32i, 0i-D/F only)
    The specification of tool number(data) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    5 : Automatic operation
    6 : Used next group or current used group
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected

    toollife\cnc_instlifedt

    Inserts the tool data. Tool information is set with the state of "life remaining." Added data is inserted after the specified tool use-order number.

    If a tool is added to an unregistered tool group, the tool group itself is registered. In this case, the life value, life counter, H code, and D code are set to 0, and the life counter assumes the parameter setting.

    This function is not available for T/TT system. (except 30i series, 0i-D/F)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_instlifedt(unsigned short FlibHndl,IDBITD *inst);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    inst in

    Pointer to the IDBITD structure to set the tool data. The IDBITD structure is as follows.

    typedef struct idbitd {
        short      datano;         /* Tool group number. */
        short      type;           /* Tool use-order number. */
        long       data;           /* Tool number. */
    } IDBITD ;
    
    datano
    Specify the tool group number.
    type
    Specify the tool use-order number.
    data
    Specify the tool number.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(datano) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number(type) is wrong.
    EW_DATA data error
    The specification of tool number(data) is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
    The following details status will be set onto the member, err_no of ODBERR structure.(30i, 0i-D/F only)
    0 : error except EW_DATA
    1 : tool number(data) error
    5 : automatic operation
    6 : used next group or current used group
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_OVRFLOW memory overflow
    The maximum number of tool which can be registered is exceeded.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_rd1length

    Reads the tool length compensation number of the specified tool group and tool number. This function is effective for only M Series. 0 is always read for T Series.

    This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i, so use cnc_rd1tlifedat2 function instead of cnc_rd1length function.

    And this function can be only used by the tool number of under 4 digits, so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd1length(unsigned short FlibHndl, short grp_num,short tool_num,ODBTLIFE4 *tl_len1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tool_num in

    Specify the tool number.

    tl_len1 out

    Pointer to the ODBTLIFE4 structure including the tool length compensation number. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool number. */
        long   data ;      /* Tool length compensation number. (always 0 in T Series) */
    } ODBTLIFE4 ;
    
    The tool length compensation number of the specified tool is stored in "tl_len1.data" with binary format. The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool number(tool_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rd1radius

    Reads the cutter radius compensation number of the specified tool group and tool number.

    This function is effective for only M Series. 0 is always read for T Series.

    This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i , so use cnc_rd1tlifedat2 function instead of cnc_rd1radius function.

    And this function can be only used by the tool number of under 4 digits, so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd1radius(unsigned short FlibHndl, short grp_num,short tool_num,ODBTLIFE4 *radius1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tool_num in

    Specify the tool number.

    radius1 out

    Pointer to the ODBTLIFE4 structure including the cutter radius compensation number. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool number. */
        long   data ;      /* Cutter radius compensation number. (always 0 in T Series) */
    } ODBTLIFE4 ;
    
    The cutter radius compensation number of the specified tool is stored in "radius1.data" with binary format. The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool number(tool_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rd1tlifedat2

    Reads the various tool information of the specified tool group and tool number. The following information can be acquired.

    • Tool length compensation number.(always 0 in T series)
    • Cutter radius compensation number.(always 0 in T series)
    • Tool information
    • 0 : (refer to the following)
      1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    Please use this function because the cnc_rd1tlifedata function cannot be used when the option, "Tool life management B" is used with Series 16i, 18i.

    Please use this function to get tool data with Series 0i-F, 30i. The cnc_rd1tlifedata function can be only used by the tool number of under 4 digits.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd1tlifedat2(unsigned short FlibHndl,short grp_num,long tool_num,IODBTD2 *tld1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tool_num in

    Specify the tool number.

    tld1 out

    Pointer to the IODBTD2 structure including the various tool information. The IODBTD2 structure is as follows.

    typedef struct iodbtd2 {
        short   datano;   /* Tool group number. */
        short   dummy;    /* Not used. */
        long    type;     /* Not used. */
        long    tool_num; /* Tool number. */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD2 ;
    
    The following information are stored in "tld1" with binary format.
    tld1.datano
    Tool group number.
    tld1.tool_num
    Tool number.
    tld1.h_code
    Tool length compensation number.(always 0 in T series)
    tld1.d_code
    Cutter radius compensation number.(always 0 in T series)
    tld1.tool_inf
    Tool information.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool number(tool_num) is wrong.
    EW_NOOPT no option
  • Series 15i, 16/18/21/120i, 0i, 30i
  • The tool life management function and the extended driver/library function are necessary.
  • Series 16i/18i
  • The tool life management function, the tool life management B function and the extended driver/library function are necessary.

    toollife\cnc_rd1tlifedata

    Reads the various tool information of the specified tool group and tool number. The following information are acquired.

    • Tool length compensation number.(always 0 in T series)
    • Cutter radius compensation number.(always 0 in T series)
    • Tool information
    • 0 : (refer to the following)
      1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    The currently used tool group and tool are referred by specifying 0 in "grp_no" and "tool_no". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i, so use cnc_rd1tlifedat2 function instead of cnc_rd1tlifedata function.

    And this function can be only used by the tool number of under 4 digits, so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd1tlifedata(unsigned short FlibHndl,short grp_no,short tool_no,IODBTD *tld1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in

    Specify the tool group number.

    tool_no in

    Specify the tool number.

    tld1 out

    Pointer to the IODBTD structure including the various tool information. The IODBTD structure is as follows.

    typedef struct iodbtd {
        short   datano;   /* Tool group number. */
        short   type;     /* Not used. */
        long    tool_num; /* Tool number. */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD ;
    
    The following information are stored in "tld1" with binary format.
    tld1.datano
    Tool group number.
    tld1.tool_num
    Tool number.
    tld1.h_code
    Tool length compensation number. (always 0 in T series)
    tld1.d_code
    Cutter radius compensation number. (always 0 in T series)
    tld1.tool_inf
    Tool information.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_NUMBER data number error
    The specification of tool group number(grp_no) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool number(tool_no) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rd2length

    Reads the tool length compensation number of the specified tool group and tool use-order number.

    This function is effective for only M Series. 0 is always read for T Series.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd2length(unsigned short FlibHndl, short grp_num,short tuse_num,ODBTLIFE4 *tl_len2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tuse_num in

    Specify the tool use-order number.

    tl_len2 out

    Pointer to the ODBTLIFE4 structure including the tool length compensation number. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool use-order number. */
        long   data ;      /* Tool length compensation number. (always 0 in T Series) */
    } ODBTLIFE4 ;
    
    The tool length compensation number of the specified tool is stored in "tl_len2.data" with binary format. The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number (tuse_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rd2radius

    Reads the cutter radius compensation number of the specified tool group and tool use-order number.

    This function is effective for only M Series. 0 is always read for T Series.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd2radius(unsigned short FlibHndl, short grp_num,short tuse_num,ODBTLIFE4 *radius2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tuse_num in

    Specify the tool use-order number.

    radius2 out

    Pointer to the ODBTLIFE4 structure including the cutter radius compensation number. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool use-order number. */
        long   data ;      /* Cutter radius compensation number. (always 0 in T Series) */
    } ODBTLIFE4 ;
    
    The cutter radius compensation number of the specified tool is stored in "radius2.data" with binary format. The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number (tuse_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rd2tlifedata

    Reads the various tool information of the specified tool group and tool use-order number. The following information are acquired.

    • Tool length compensation number(always 0 in T series)
    • Cutter radius compensation number(always 0 in T series)
    • Tool information
    • 0 : (refer to the following)
      1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    The currently used tool group and tool are referred by specifying 0 in "grp_no". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    In case of specifying 0 in "use_no", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rd2tlifedata(unsigned short FlibHndl,short grp_no,short use_no,IODBTD *tld2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in

    Specify the tool group number.

    use_no in

    Specify the tool use-order number.

    tld2 out

    Pointer to the IODBTD structure including the various tool information. The IODBTD structure is as follows.

    typedef struct iodbtd {
        short   datano;   /* Tool group number. */
        short   type;     /* Tool use-order number. */
        long    tool_num; /* Tool number. */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD ;
    
    The following information are stored in "tld2" with binary format.
    tld2.datano
    Tool group number.
    tld2.type
    Tool use-order number.
    tld2.tool_num
    Tool number.
    tld2.h_code
    Tool length compensation number (always 0 in T series)
    tld2.d_code
    Cutter radius compensation number. (always 0 in T series)
    tld2.tool_inf
    Tool information.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_no) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number(use_no) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdcount

    Reads the tool life counter of the specified tool group.

    The unit of the tool life counter is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.

    For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdcount(unsigned short FlibHndl, short number,ODBTLIFE3 *count);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool group number.

    count out

    Pointer to the ODBTLIFE3 structure including the tool life counter. The ODBTLIFE3 structure is as follows.

    typedef struct odbtlife3 {
        short  datano ;            /* Tool group number. */
        short  dummy ;             /* Not used. */
        long  data ;               /* Tool life counter. */
    } ODBTLIFE3 ;
    
    The tool life counter of the specified tool group is stored in "count.data "with binary format. The tool life counter of the currently used tool group number is stored by specifying 0 in "number". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(number) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdexchgtgrp

    The group number where the tool exchange signal has been generated is acquired in ascending order.

    When the function for optional group number of tool life management B option is used, the optional group number set in each group is also acquired.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdexchgtgrp(unsigned short FlibHndl,short *num_grp, ODBEXGP *exgrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    num_grp in/out

    Specify the pointer to the variable where the number which wants to be acquired is stored. When the value of 0 or less was specified, EW_LENGTH error occurs. This function returns the number of data which was acquired actually. When there is not any exchange necessary tool group, 0 is set.

    exgrp out

    Specify the pointer to the ODBEXGP structure which stores the tool group number for which the acquired exchange is necessary. When the array of the number specified by num_grp is not prepared, the operation of this function is not guaranteed. The ODBEXGP structure is as follows.

    typedef struct odbexgp {
        long    grp_no;     // Tool group number
        long    opt_grpno;  // Optional group number
    } ODBEXGP;
    
    grp_no
    Tool group number
      The tool group number from which the tool exchange signal is derived is set.
    opt_grpno
    Optional group number
      The optional group number set in the tool group where the tool exchange signal has been generated is set. When the optional group number setting function is not used and the optional group number is not set, 0 is set.


    ERRORS

    Code Description
    EW_FUNC Unavailable
    This function is not supported by CNC.
    EW_LENGTH Data length error
    The value of 0 or less was specified for acquisition number(*num_grp).
    EW_NOOPT No option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdgrpid

    Reads the tool group number in which the specified tool is registered.

    When the same tool number exists in two or more tool groups,the smallest group number is stored.

    This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i, so use cnc_rdgrpid2 function instead of cnc_rdgrpid function.

    And this function can be only used by the tool number of under 4 digits,so use cnc_rdgrpid2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpid(unsigned short FlibHndl, short number,ODBTLIFE1 *grpid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool number.

    grpid out

    Pointer to the ODBTLIFE1 structure including the tool group number. The ODBTLIFE1 structure is as follows.

    typedef struct odbtlife1 {
        short  dummy ;             /* Not used. */
        short  type ;              /* Tool number. */
        long   data ;              /* Tool group number. */
    } ODBTLIFE1 ;
    
    The tool group number in which the specified tool number is registered is stored in "grpid.data" with binary format. The currently used tool group number is stored by specifying 0 in "number". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_ATTRIB data attribute error
    The specification of tool number(number) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdgrpid2

    Reads the tool group number in which the specified tool is registered.

    When the same tool number exists in two or more tool groups, the smallest group number is stored.

    Please use this function because the cnc_rdgrpid function cannot be used when the option, "Tool life management B" is used with Series 16i,18i.

    And gets the tool group number by this function with Series 0i-F, 30i, so use cnc_rdgrpid function in case of setting the tool number of under 4 digits.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpid2(unsigned short FlibHndl,long number,ODBTLIFE5 *grpid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool number.

    grpid out

    Pointer to the ODBTLIFE5 structure including the tool group number. The ODBTLIFE5 structure is as follows.

    typedef struct odbtlife5 {
        long   dummy ;             /* Not used. */
        long   type ;              /* Tool number. */
        long   data ;              /* Tool group number. */
    } ODBTLIFE5 ;
    
    The tool group number in which the specified tool number is registered is stored in "grpid.data" with binary format. The currently used tool group number is stored by specifying 0 in "number". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_ATTRIB data attribute error
    The specification of tool number(number) is wrong.
    EW_NOOPT no option
  • Series 15i, 16/18/21/21i, 0i, 30i
  • The tool life management function and the extended driver/library function are necessary.
  • Series 16i/18i
  • The tool life management function, the tool life management B function and the extended driver/library function are necessary.

    toollife\cnc_rdgrpinfo

    Reads the tool group information. The following information can be acquired.

    • Number of tool
    • Tool life value
    • Tool life counter
    • Type of tool life counter(0 : count, 1 : minute)

    The unit of the tool life value is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.

    For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpinfo(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI *grpinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_grp in

    Specify the start tool group number.

    e_grp in

    Specify the end tool group number.

    length in

    Specify the length of the data block(size of IODBTGI structure)

    IODBTGI

    N is number of the tool group to be read.

    grpinfo out

    Pointer to the IODBTGI structure including the tool group information. The IODBTGI structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;       /* Start tool group number. */
        short      dummy;       /* Not used. */
        short      e_grp;       /* End tool group number. */
        struct {
            long   n_tool;      /* Number of tool. */
            long   count_value; /* Tool life value. */
            long   counter;     /* Tool life counter. */
            long   count_type;  /* Tool life counter type. */
        } data[N];
    } IODBTGI ;         /* N is number of tool group to be read. */
    
    The following information are stored in "grpinfo" with binary format.
    grpinfo.s_grp
    Start tool group number
    grpinfo.e_grp
    End tool group number
    grpinfo.data[i].n_tool
    Number of tool
    grpinfo.data[i].count_value
    Tool life value
    grpinfo.data[i].counter
    Tool life counter
    grpinfo.data[i].count_type
    Tool life counter type
    0 : count
    1 : minute


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdgrpinfo2

    Reads the tool group information 2. The following information can be acquired.

    • Optional group number

    This function is not available for T and TT series.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpinfo2(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI2 *grpinfo2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_grp in

    Specify the start tool group number.

    e_grp in

    Specify the end tool group number.

    length in

    Specify the length of the data block (size of IODBTGI2 structure)

    IODBTGI2

    N is the number of the tool group to be read.

    grpinfo2 out

    Pointer to the IODBTGI2 structure including the tool group information. The IODBTGI2 structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;           /* Start group number */
        short      dummy;           /* unused */
        short      e_grp;           /* End group number */
        long       opt_grpno[N];    /* Optional groupnumber */
    } IODBTGI2 ;    /* N is the number of tool group to be read. */
    
    The following information are stored in "grpinfo2" with binary format.
    grpinfo2.s_grp
    Start tool group number
    grpinfo2.e_grp
    End tool group number
    grpinfo2.opt_grpno[i]
    Optional group number


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI2 structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_NOOPT no option
    The tool life management B function and the extended driver/library function are necessary.(16i/18i only)
    The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only)
    EW_PARAM parameter error(0i-F, 30i only)
    The tool life management B function and optional group number are necessary.

    toollife\cnc_rdgrpinfo3

    Reads the tool group information 3. The following information can be acquired.

    • Rest counter

    This function is not available for T and TT series.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpinfo3(unsigned short FlibHndl,short s_grp,short e_grp,short length,IODBTGI3 *grpinfo3);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_grp in

    Specify the start tool group number.

    e_grp in

    Specify the end tool group number.

    length in

    Specify the length of the data block (size of IODBTGI3 structure)

    IODBTGI3

    N is the number of the tool group to be read.

    grpinfo3 out

    Pointer to the IODBTGI3 structure including the tool group information. The IODBTGI3 structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;          /* start group number */
        short      dummy;          /* unused */
        short      e_grp;          /* end group number */
        long       life_rest[N];   /* rest counter */
    } IODBTGI3 ;    /* N is the number of tool group to be read. */
    
    The following information are stored in "grpinfo3" with binary format.
    grpinfo3.s_grp
    start tool group number
    grpinfo3.e_grp
    end tool group number
    grpinfo3.life_rest[i]
    rest counter


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI3 structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_NOOPT no option
    The tool life management B function and the extended driver/library function are necessary.(16i/18i only)
    The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only)
    EW_PARAM parameter error(0i-F, 30i only)
    The tool life management B function and reset counter are necessary.

    toollife\cnc_rdgrpinfo4

    Reads the tool group information 4. The following information can be acquired.

    • Numbers of tool
    • Tool life value
    • Tool life counter
    • Tool life counter type
    • 0 : count
      1 : minute
    • Optional group number
    • Rest counter

    The unit of the tool life value is either [minute] or [count]. The parameter LTM(6800#2) determines which unit is used. For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.

    In case of M system, if tool life management B option(In case of 0i-F, 30i/31i/32i:Parameter No.6805#4) is used, the optional group number and the rest counter is also acquired. When the tool life management B is not used or the system is T, the 0 is set for the optional group number and the rest counter.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdgrpinfo4(unsigned short FlibHndl,short grp_no, short direction, short num_to_read,short *num_read, IODBTGI4 *grpinfo4);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in

    Specify the read start tool group number. When the value of outside of the range to the tool group number is specified, EW_NUMBER error occurs. In case of range of the tool group number, the read is started from a group which is the nearest from the specified group number.

    direction in

    Specify the search direction. The direction of the search specifies whether to read in the ascending order or the descending order based on the number specified by grp_no.

    0 : Ascending order (direction where tool group number increases)
    1 : Descending order (direction where tool group number decreases)

    num_to_read in

    Specify the number which wants to read. When the value of 0 or less was specified, EW_LENGTH error occurs.

    num_read out

    Specify the pointer to the variable to store the number actually read. If the group which registered is not found when the tool group was searched according to the specified direction, the 0 is set as the result.

    grpinfo4 out

    the pointer to the array of IODBTGI4 structure which returns the tool group information. The IODBTGI4 structure is as follows.

    typedef struct iodbtgi4 {
        short   grp_no;
        long    n_tool;
        long    count_value;
        long    counter;
        long    count_type;
        long    opt_grpno;
        long    life_rest;
    } IODBTGI4; 
    
    The following information can be acquired.
    grp_no
    Tool group number
    n_tool
    Numbers of tool
    count_value
    Tool life value
    counter
    Tool life counter
    count_type
    Tool life counter type
    opt_grpno
    Optional group number
    life_rest
    Rest counter

    <Note>
    Prepare the arrays of the number or more specified by num_to_read. When the array number is less than the specified number, the operation of this function is not guaranteed.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The value of 0 or less was specified for read number(num_to_read).
    EW_NUMBER Data number error
    Tool group number(grp_no) is wrong.
    EW_ATTRIB Data attribute error
    Search direction(direction) is wrong.
    EW_NOOPT No option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdlife

    Reads the tool life value of the specified tool group.

    The unit of the tool life value is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used. For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group. Reads the tool life value of the specified tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdlife(unsigned short FlibHndl, short number,ODBTLIFE3 *life);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool group number.

    life out

    Pointer to the ODBTLIFE3 structure including the tool life value. The ODBTLIFE3 structure is as follows.

    typedef struct odbtlife3 {
        short  datano ;            /* Tool group number. */
        short  dummy ;             /* Not used. */
        long  data ;               /* Tool life value. */
    } ODBTLIFE3 ;
    
    The tool life value of the specified tool group is stored in "life.data" with binary format. The tool life value of the currently used tool group number is stored by specifying 0 in "number". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(number) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdmaxgrp

    Reads the maximum number of tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmaxgrp(unsigned short FlibHndl,ODBLFNO *maxgrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    maxgrp out

    Pointer to the ODBLFNO structure including the maximum number of tool group. The ODBLFNO structure is as follows.

    typedef struct odblfno {
        short     datano;  /* Not used. */
        short     type;    /* Not used. */
        short     data;    /* Maximum number of tool group */
    } ODBLFNO ;
    


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdmaxtool

    Reads the maximum number of tool within group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmaxtool(unsigned short FlibHndl,ODBLFNO *maxtool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    maxtool out

    Pointer to the ODBLFNO structure including the maximum number of tool group. The ODBLFNO structure is as follows.

    typedef struct odblfno {
        short  datano; /* Not used. */
        short  type;   /* Not used. */
        short  data    /* Maximum number of tool within group. */
    } ODBLFNO ;
    


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdngrp

    Reads the total number of tool groups in which at least one tool is registered.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdngrp(unsigned short FlibHndl, ODBTLIFE2 *ngrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    ngrp out

    Pointer to the ODBTLIFE2 structure including the total number of tool groups. The ODBTLIFE2 structure is as follows.

    typedef struct odbtlife2 {
        short  dummy[2] ;          /* Not used. */
        long  data ;               /* Number of tool groups */
    } ODBTLIFE2 ;
    
    The total number of tool groups in which at least one tool is registered is stored in "ngrp.data" with binary format.


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdntool

    Reads the number of tools which are registered in the specified tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdntool(unsigned short FlibHndl, short number,ODBTLIFE3 *ntool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the tool group number.

    ntool out

    Pointer to the ODBTLIFE3 structure including the number of tools. The ODBTLIFE3 structure is as follows.

    typedef struct odbtlife3 {
        short  datano ;            /* Tool group number. */
        short  dummy ;             /* Not used. */
        long   data ;              /* Number of tool. */
    } ODBTLIFE3 ;
    
    The number of tools which are registered in the specified tool group is stored in "ntool.data" with binary format. The number of tools which are registered in the currently used tool group number is stored by specifying 0 in "number". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(number) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtlgrp

    Reads the tool group information. The following information can be acquired.

    • Number of tool
    • Number of free tool
    • Tool life value
    • Tool life counter
    • Selected tool use-order number
    • Optional tool group number
    • Rest counter
    • Status of rest signal
    • Type of tool life counter (0 : count, 1 : minute)

    The unit of the tool life value is either [minute] or [count]. The parameter LTM (Series 15i:7400#3, Series16i/18i/21i, 0i, 30i:6800#2) determines which unit is used. The parameter LTM (30i:6800#2) determines which unit is used.

    For M Series, it is possible to specify the tool life counter type (time or count) by G10 command to every tool group.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtlgrp(unsigned short FlibHndl, long grp_no, short* num, IODBTLGRP *tlgrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in

    Specify the starting group number.

    num in/out

    Pointer to the number of groups to be read. Actual number of groups being read is stored after this function call.

    tlgrp out

    Pointer to the array of the ODBTLGRP structure including the tool group information. The ODBTLGRP structure is as follows.

    typedef struct iodbtlgrp {
         long   ntool;       /* number of tool */
         long   nfree;       /* number of free tool */
         long   life;        /* tool life */
         long   count;       /* tool life counter */
         long   use_tool;    /* selected tool use-order number */
         long   opt_grpno;   /* optional tool group number */
         long   life_rest;   /* rest counter */
         short  rest_sig;    /* status of rest signal */
         short  count_type;  /* type of tool life counter */
    } ODBTLGRP ;
    
    The following information are stored in "tlgrp" with binary format.
    ntool
    Number of tool
    nfree
    Number of free tool
    life
    Tool life value
    count
    Tool life counter
    use_tool
    Selected tool use-order number
    opt_grpno
    Optional tool group number *Note1)
    life_rest
    Rest counter *Note1)
    rest_sig
    Status of rest signal *Note2)
    0 : rest signal OFF
    1 : rest signal ON
    count_type
    Tool life counter type
    0 : count
    1 : minute
    Note1) It is -1 when Series 15i and without the tool life management B function in Series 16i/18i, 0i-F and 30i.
    Note2) It is 0 when Series 15i and without the tool life management B function in Series 16i/18i, 0i-F and 30i.
    Note1) It is -1 when without the tool life management B function.
    Note2) It is 0 when without the tool life management B function.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of tool groups (*num) is 0 or less.
    EW_NUMBER Data number error
    The specification of tool group number (grp_no) is wrong.
    EW_NOOPT No option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtlinfo

    Reads the maximum number of tool group, the maximum number of tool within group and the maximum number of life count.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtlinfo(unsigned short FlibHndl, ODBTLINFO *tlinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tlinfo out

    Pointer to the ODBTLINFO structure including the maximum number of tool group, the maximum number of tool within group and the maximum number of life count. The ODBTLINFO structure is as follows.

    typedef struct odbtlinfo {
         long      max_group;  /* maximum number of tool group */
         long      max_tool;   /* maximum number of tool within group */
         long      max_minute; /* maximum number of life count (minutes) */
         long      max_cycle;  /* maximum number of life count (cycles) */
    } ODBTLINFO;
    
    The following information are stored in "tlinfo" with binary format.
    max_group
    maximum number of tool group.
    max_tool
    maximum number of tool within group.
    max_minute
    maximum number of life count. (minutes)
    max_cycle
    maximum number of life count. (cycles)


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtltool

    Reads the various tool information of the specified tool group. The following information are acquired.

  • Tool number
  • Tool length compensation number (always 0 in T series)
  • Cutter radius compensation number (always 0 in T series)
  • Tool information
  • 0 : Tool data is nothing.
    1 : This tool is registered (available).
    2 : This tool has expired.
    3 : This tool was skipped.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtltool(unsigned short FlibHndl, long grp_no, long use_no, short* num, IODBTLTOOL *tltool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_no in

    Specify the tool group number.

    use_no in

    Specify the starting tool use-order number.

    num in/out

    Pointer to the number of tool data to be read. Actual number of tool data being read is stored after this function call.

    tltool out

    Pointer to the array of the IODBTLTOOL structure including the tool data. The IODBTLTOOL structure is as follows.

    typedef struct iodbtltool {
         long   tool_num;   /* tool number */
         long   h_code;     /* tool length compensation number */
         long   d_code;     /* cutter radius compensation number */
         long   tool_inf;   /* tool information */
    } IODBTLTOOL ;
    
    The following information are stored in "tltool" with binary format.
    tool_num
    Tool number.
    h_code
    Tool length compensation number. (always 0 in T series)
    d_code
    Cutter radius compensation number. (always 0 in T series)
    tool_inf
    Tool information.


    ERRORS

    Code Description
    EW_LENGTH Data block length error
    The number of tool data (*num) is 0 or less.
    EW_NUMBER Data number error
    The specification of tool group number (grp_no) is wrong.
    EW_ATTRIB Data attribute error
    The specification of tool use-order number (use_no) is wrong.
    EW_NOOPT No option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtlusegrp

    Reads the used tool group number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtlusegrp(unsigned short FlibHndl, ODBUSEGRP *usegrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    usegrp out

    Pointer to the ODBUSEGRP structure including the used tool group number. The ODBUSEGRP structure is as follows.

    typedef struct odbusegrp {
       long   next;      /* number of tool group to be used next */
       long   use;       /* number of tool group currently in use */
       long   slct;      /* number of tool group currently selected */
       long   opt_next;  /* number of tool optional group to be used next */
       long   opt_use;   /* number of tool optional group currently in use */
       long   opt_slct;  /* number of tool optional group currently selected */
    } ODBUSEGRP ;
    
    The following information are stored in "usegrp" with binary format.
    next
    Number of tool group to be used next
      The tool group number for which life count operation is to be started next.
    use
    Number of tool group currently in use
      The tool group number for which life count operation is currently being performed.
    slct
    Number of tool group currently selected
      The tool group number for which life count operation is currently being performed or for which the last life count operation was performed.
    opt_next
    Number of optional tool group to be used next *Note1)
    opt_use
    Number of optional tool group currently in use *Note1)
    opt_slct
    Number of optional tool group currently selected *Note1)
    Note1) It is -1 when Series 15i and without the tool life management B function in Series 16i/18i, 0i-F and 30i.
    Note1) It is -1 when without the tool life management B function.


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtoolgrp

    Reads the various tool information of the specified tool group at a time.

    The unit of the tool life value and the tool life counter is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtoolgrp(unsigned short FlibHndl,short grp_num,short length,ODBTG *toolgrp);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number. The currently used tool group is referred by specifying 0.

    length in

    Specify the length of the data block(size of ODBTG structure)

    ODBTG

    N is Number of tool.

    toolgrp out

    Pointer to the ODBTG structure including the various tool information. The ODBTG structure is as follows.

    typedef struct odbtg {
        short  grp_num ;   /* Tool group number. */
        short  dummy[2] ;  /* Not used. */
        long  ntool ;      /* Number of tool. */
        long  life ;       /* Tool life value. */
        long  count ;      /* Tool life counter. */
        struct {
            long  tuse_num ;   /* Tool use-order number */
            long  tool_num ;   /* Tool number */
            long  length_num ; /* Tool length compensation no.*/
            long  radius_num ;/* Cutter radius compensation no.*/
            long  tinfo ;      /* Tool information. */
        } data[N] ;
    } ODBTG ;                    /* N is Number of tool. */
    
    The following information are stored in "toolgrp" with binary format.

    toolgrp.ntool
    Number of tool.
    toolgrp.life
    Tool life value.
    toolgrp.count
    Tool life counter.
    toolgrp.data[i].tuse_num
    Tool use-order number.
    toolgrp.data[i].tool_num
    Tool number.
    toolgrp.data[i].length_num
    Tool length compensation number. (always 0 in T series)
    toolgrp.data[i].radius_num
    Cutter radius compensation number. (always 0 in T series)
    toolgrp.data[i].tinfo
    Tool information.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBTG structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdtoolrng

    Reads the number of tool, the tool life value and the tool life counter within the specified tool group range.

    The unit of the tool life value and the tool life counter is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtoolrng(unsigned short FlibHndl,short s_number,short e_number,short length,IODBTR *toolnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start tool group number.

    e_number in

    Specify the end tool group number.

    length in

    Specify the length of the data block(size of IODBTR structure)

    IODBTR

    N is number of the tool group to be read.

    toolnum out

    Pointer to the IODBTR structure including the number of tool, the tool life value and the tool life counter. The IODBTR structure is as follows.

    typedef struct iodbtr {
        short  datano_s ;   /* Start group number. */
        short  dummy ;      /* Not used. */
        short  datano_e ;   /* End group number. */
        struct {
            long  ntool ;     /* Number of tool. */
            long  life ;      /* Tool life value. */
            long  count ;     /* Tool life counter. */
        } data[N] ;
    } IODBTR ;      /* N is number of tool groups to be read. */s
    
    The number of tool, the tool life value and the tool life counter are stored in each "toolnum.data[i].ntool", "toolnum.data[i].life" and "toolnum.data[i].count" with binary format.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTR structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_number,e_number) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdusegrpid

    Reads the used tool group number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdusegrpid(unsigned short FlibHndl,ODBUSEGR *usegrpid);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    usegrpid out

    Pointer to the ODBUSEGR structure including the used tool group number. The ODBUSEGR structure is as follows.

    typedef struct odbusegr {
        short  datano; /* Not used */
        short  type;   /* Not used */
        long   next;   /* Number of tool group to be used next */
        long   use;    /* Number of tool group currently in use */
        long   slct;   /* Number of tool group currently selected */
    } ODBUSEGR ;
    
    Number of tool group to be used next
    the tool group number for which life count operation is to be started next.
    Number of tool group currently in use
    the tool group number for which life count operation is currently being performed.
    Number of tool group currently selected
    the tool group number for which life count operation is currently being performed or for which the last life count operation was performed.


    ERRORS

    Code Description
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_rdusetlno

    Read the tool use-order numbers in the specified groups.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdusetlno(unsigned short FlibHndl,short s_grp,short e_grp,short length,ODBTLUSE *usetlno);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_grp in

    Specify the start tool group number.

    e_grp in

    Specify the end tool group number.

    length in

    Specify the length of the data block(size of ODBTLUSE structure)

    ODBTLUSE

    N is number of the tool group to be read.

    usetlno out

    Pointer to the ODBTLUSE structure including the tool use-order number. The ODBTLUSE structure is as follows.

    typedef struct odbtluse {
        short   s_grp;             /* Start tool group number. */
        short   dummy;             /* Not used. */
        short   e_grp;             /* End tool group number. */
        long    data[N];   /* Tool use-order number in groups. */
    } ODBTLUSE ;   /* N is the number of tool groups to be read. */
    
    The following information are stored in "usetlno" with binary format.
    usetlno.s_grp
    start tool group number
    usetlno.e_grp
    end tool group number
    usetlno.data[i]
    Tool use-order number in groups


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of ODBTLUSE structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_t1info

    Reads the tool information of the specified tool group and tool number.

    This function cannot be used with Series 15i or the "Tool life management B" option of Series 16i/18i, so use cnc_rd1tlifedat2 function instead of cnc_t1info function.

    And this function can be only used by the tool number of under 4 digits, so use cnc_rd1tlifedat2 function in case of setting the tool number of over 4 digits with Series 0i-F, 30i.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_t1info(unsigned short FlibHndl,short grp_num, short tool_num,ODBTLIFE4 *tinfo1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tool_num in

    Specify the tool number.

    tinfo1 out

    Pointer to the ODBTLIFE4 structure including the tool information. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool number. */
        long   data ;      /* Tool information. */
    } ODBTLIFE4 ;
    
    The tool information of the specified tool is stored in "tinfo1.data" with binary format as follows.
    tinfo1.data Tool information
    0 (refer to the following)
    1 This tool is registered(available).
    2 This tool has expired.
    3 This tool was skipped.

    The currently used tool group and tool are referred by specifying 0 in "grp_num" and "tool_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool number(tool_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_t2info

    Reads the tool information of the specified tool group and tool use-order number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_t2info(unsigned short FlibHndl,short grp_num,short tuse_num,ODBTLIFE4 *tinfo2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tuse_num in

    Specify the tool use-order number.

    tinfo2 out

    Pointer to the ODBTLIFE4 structure including the tool information. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool use-order number. */
        long   data ;      /* Tool information. */
    } ODBTLIFE4 ;
    
    The tool information of the specified tool is stored in "tinfo2.data" with binary format as follows.
    tinfo2.data Tool information
    0 (refer to the following)
    1 This tool is registered(available).
    2 This tool has expired.
    3 This tool was skipped.

    The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored. In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number (tuse_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_toolnum

    Reads the tool number of the specified tool group and tool use-order number.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_toolnum(unsigned short FlibHndl,short grp_num,short tuse_num,ODBTLIFE4 *toolnum);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    grp_num in

    Specify the tool group number.

    tuse_num in

    Specify the tool use-order number.

    toolnum out

    Pointer to the ODBTLIFE4 structure including the tool number. The ODBTLIFE4 structure is as follows.

    typedef struct odbtlife4 {
        short  datano ;    /* Tool group number. */
        short  type ;      /* Tool use-order number. */
        long   data ;      /* Tool number. */
    } ODBTLIFE4 ;
    
    The tool number of the specified tool is stored in "toolnum.data" with binary format.

    The currently used tool group and tool are referred by specifying 0 in "grp_num". However, in case that any tool group number has never be specified since power-on, 0 is stored.

    In case of specifying 0 in "tuse_num", either the currently used tool for already used tool group or the first tool for not-used tool group is referred.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(grp_num) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number (tuse_num) is wrong.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.

    toollife\cnc_wr1tlifedat2

    Writes the various tool information of the specified tool group and tool number. The following information can be modified.

    • Tool number.
    • Tool length compensation number.
    • Cutter radius compensation number.
    • Tool information
    • 1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    This function is not available for T/TT system. (except 30i series, 0i-D/F)

    Please use this function because the cnc_wr1tlifedata function cannot be used when the option, "Tool life management B" function is used with Series 16i, 18i, 0i-F and 30i/31i/32i.

    Please use this function because the cnc_wr1tlifedata function cannot be used when the option, "Tool life management B" function is used.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wr1tlifedat2(unsigned short FlibHndl,IODBTD2 *tld1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tld1 in

    Pointer to the IODBTD2 structure to set the various tool information. The IODBTD2 structure is as follows.

    typedef struct iodbtd2 {
        short   datano;   /* Tool group number. */
        short   dummy;    /* Not used. */
        long    type;     /* Tool number(present). */
        long    tool_num; /* Tool number(update). */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD2 ;
    
    datano
    Specify the tool group number.
    type
    Specify the present tool number to be modified.
    tool_num
    Specify the new tool number.
    h_code
    Specify the tool length compensation number.
    d_code
    Specify the cutter radius compensation number.
    tool_inf
    Specify the tool information.
    1 : This tool is registered(available).
    2 : This tool has expired.
    3 : This tool was skipped.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(datano) is wrong.
    EW_ATTRIB data attribute error
    The specification of (present) tool number (type) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : The new tool number(tool_num) error
    2 : Tool length compensation number(h_code) error
    3 : Cutter compensation number(d_code) error
    4 : Tool information(tool_inf) error
    EW_NOOPT no option
  • Series 15i, 16/18/21/120i, 0i, 30i/31i/32i
  • The tool life management function and the extended driver/library function are necessary.
  • Series 16i/18i
  • The tool life management function, the tool life management B function and the extended driver/library function are necessary.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_wr1tlifedata

    Writes the various tool information of the specified tool group and tool number. The following information can be modified.

    • Tool number.
    • Tool length compensation number.
    • Cutter radius compensation number.
    • Tool information
    • 1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    This function is not available for T/TT system. (except 30i series, 0i-D/F)

    This function cannot be used with Series 15i or the "Tool life management B" function of Series 16i/18i, 0i-F and 30i, so use cnc_wr1tlifedat2 function instead of cnc_wr1tlifedata function.

    This function cannot be used with the "Tool life management B" function, so use cnc_wr1tlifedat2 function instead of cnc_wr1tlifedata function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wr1tlifedata(unsigned short FlibHndl,IODBTD *tld1);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tld1 in

    Pointer to the IODBTD structure to set the various tool information. The IODBTD structure is as follows.

    typedef struct iodbtd {
        short   datano;   /* Tool group number. */
        short   type;     /* Tool number(present). */
        long    tool_num; /* Tool number(update). */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD ;
    
    datano
    Specify the tool group number.
    type
    Specify the present tool number to be updated.
    tool_num
    Specify the new tool number.
    h_code
    Specify the tool length compensation number.
    d_code
    Specify the cutter radius compensation number.
    tool_inf
    Specify the tool information.
    1 : This tool is registered(available).
    2 : This tool has expired.
    3 : This tool was skipped.


    ERRORS

    Code Description
    EW_FUNC Unavailable(only Series 16i/18i)
    The tool life management B option is used.
    EW_NUMBER data number error
    The specification of tool group number(datano) is wrong.
    EW_ATTRIB data attribute error
    The specification of the present tool number (type) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : The new tool number(tool_num) error
    2 : Tool length compensation number(h_code)
    3 : Cutter compensation number(d_code) error
    4 : Tool information(tool_inf) error
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_wr2tlifedata

    Writes the various tool information of the specified tool group and tool use-order number. The following information can be modified.

    • Tool number.
    • Tool length compensation number.
    • Cutter radius compensation number.
    • Tool information
    • 1 : This tool is registered(available).
      2 : This tool has expired.
      3 : This tool was skipped.

    This function is not available for T/TT system. (except 30i series, 0i-D/F)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wr2tlifedata(unsigned short FlibHndl,IODBTD *tld2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    tld2 in

    Pointer to the IODBTD structure to set the various tool information. The IODBTD structure is as follows.

    typedef struct iodbtd {
        short   datano;   /* Tool group number. */
        short   type;     /* Tool use-order number. */
        long    tool_num; /* Tool number. */
        long    h_code;   /* Tool length compensation number. */
        long    d_code;   /* Cutter radius compensation number. */
        long    tool_inf; /* Tool information. */
    } IODBTD ;
    
    datano
    Specify the tool group number.
    type
    Specify the tool use-order number which indicates the tool to be updated.
    tool_num
    Specify the new tool number.
    h_code
    Specify the tool length compensation number.
    d_code
    Specify the cutter radius compensation number.
    tool_inf
    Specify the tool information.
    1 : This tool is registered(available).
    2 : This tool has expired.
    3 : This tool was skipped.


    ERRORS

    Code Description
    EW_NUMBER data number error
    The specification of tool group number(datano) is wrong.
    EW_ATTRIB data attribute error
    The specification of tool use-order number (type) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : The new tool number(tool_num) error
    2 : Tool length compensation number(h_code) error
    3 : Cutter compensation number(d_code) error
    4 : Tool information(tool_inf) error
    5 : Automatic operation
    6 : Using next group or current used group.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_wrcountr

    Writes the tool life counter within the specified tool group range.

    The unit of the tool life counter is either [minute] or [count]. The parameter LTM(Series 15/15i:7400#3, Series 16/18/21, 16i/18i/21i, 0i, 30i:6800#2) determines which unit is used.

    The maximum number of the tool life counter is the following.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C/D
    • At the count specification : 9999 counts
      : 999999 counts(in case of the tool life management B)
      At the minute specification : 4300 minutes
      : 100000 minutes(in case of the tool life management B)
    • Series 15i
    • At the count specification : 99999999 counts
      At the minute specification : 59940 minutes
    • Series 0i-F, 30i
    • At the count specification : 65535 counts
      : 99999999 counts(in case of the tool life management B)
      At the minute specification : 4300 minutes
      : 100000 minutes(in case of the tool life management B)
      (When life count interval is 0.1 seconds, the max. value is 60,000 minutes.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrcountr(unsigned short FlibHndl,short length,IDBWRC *wrcount);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IDBWRC structure)

    IDBWRC

    N is number of the tool group to be written.

    wrcount in

    Pointer to the IDBWRC structure to set the tool life counter. The IDBWRC structure is as follows.

    typedef struct idbwrc {
        short  datano_s ;  /* Start tool group number. */   
        short  dummy ;     /* Not used. */
        short  datano_e ;  /* End tool group number. */
        struct {
            long  dummy[2] ;  /* Not used. */
            long  count ;     /* Tool life counter. */
        } data[N] ;
    } IDBWRC ;  /* N is the number of tool groups to be written. */
    
    Store the start tool group number in "wrcount.datano_s" with binary format.
    Store the end tool group number in "wrcount.datano_e" with binary format.
    Store the tool life counter in "wrcount.data[i].count" with binary format.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IDBWRC structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (datano_s,datano_e) is wrong.
    EW_DATA data error(0i-F, 30i only)
    Tool life counter(count) is out of range.
    EW_NOOPT no option
    The tool life management function is necessary.

    toollife\cnc_wrgrpinfo

    Writes the tool group information. The following information can be modified.

    • Tool life value.
    • Tool life counter.
    • Type of tool life counter
    • 0 : count
      1 : minute

    This function is not available for T/TT system. (except 30i series, 0i-D/F)

    The maximum number of the tool life value and the tool life counter is the following.

    • Series 15, 16/18/21, 16i/18i/21i, 0i-A/B/C/D
    • At the count specification : 9999 counts
        : 999999 counts(in case of the tool life management B)
      At the minute specification : 4300 minutes
        : 100000 minutes(in case of the tool life management B)
    • Series 15i
    • At the count specification : 99999999 counts
      At the minute specification : 59940 minutes
    • Series 0i-F, 30i/31i/32i
    • At the count specification : 65535 counts
        : 99999999 counts(in case of the tool life management B)
      At the minute specification : 4300 minutes
        : 100000 minutes(in case of the tool life management B)
        (When life count interval is 0.1 seconds, the max. value is 60,000 minutes.)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrgrpinfo(unsigned short FlibHndl,short length,IODBTGI *grpinfo);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block(size of IODBTGI structure)

    IODBTGI

    N is number of the tool group to be written.

    grpinfo in

    Pointer to the IODBTGI structure to set the tool group information. The IODBTGI structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;       /* Start tool group number. */
        short      dummy;       /* Not used. */
        short      e_grp;       /* End tool group number. */
        struct {
            long   n_tool;      /* Not used. */
            long   count_value; /* Tool life value. */
            long   counter;     /* Tool life counter. */
            long   count_type;  /* Tool life counter type. */
        } data[N];
    } IODBTGI ;         /* N is number of tool group to be written. */
    
    s_grp
    Specify the start tool group number.
    e_grpv
    Specify the end tool group number.
    count_value
    Specify the tool life value.
    counter
    Specify the tool life counter.
    count_type
    Specify the tool life counter type.
    0 : count
    1 : minute


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Tool life value(count_value) error
    2 : Tool life counter(counter) error
    3 : Tool life counter type(count_type) error
    5 : Automatic operation
    6 : Using next group or current used group : It cannot updata except tool life counter.
    And tool group number including incorrect data will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT no option
    The tool life management function and the extended driver/library function are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_wrgrpinfo2

    Write the tool group information. The following information can be modified.

    • Optional group number.

    This function is not available for T/TT series. (except 30i series, 0i-D/F)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrgrpinfo2(unsigned short FlibHndl, short length,IODBTGI2 *grpinfo2);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block (size of IODBTGI2 structure)

    IODBTGI2

    N is the number of the tool group to be written.

    grpinfo2 in

    Pointer to the IODBTGI2 structure to set the tool group information. The IODBTGI2 structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;          /* start group number */
        short      dummy;          /* unused */
        short      e_grp;          /* end group number */
        long       opt_grpno[N];   /* optional group number */
    } IODBTGI2 ; /* N is the number of tool group to be written. */
    
    s_grp
    Specify the start tool group number.
    e_grp
    Specify the end tool group number.
    opt_grpno[i]
    Specify the optional group number.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI2 structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Optional group number(opt_grpno) error
    2 : Optional group number(opt_grpno) has already been used
    And Tool group number including incorrect data will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT no option
    The tool life management B function and the extended driver/library function are necessary.(16i/18i only)
    The tool life management function and the extended driver/library function is necessary.(0i-F, 30i/31i/32i only)
    EW_PARAM parameter error(0i-F, 30i/31i/32i only)
    The tool life management B function and optional group number are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toollife\cnc_wrgrpinfo3

    Write the tool group information. The following information can be modified.

    • Rest counter.

    This function is not available for T/TT series. (except 30i series, 0i-D/F)


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrgrpinfo3(unsigned short FlibHndl,short length,IODBTGI3 *grpinfo3);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the length of the data block (size of IODBTGI3 structure)

    IODBTGI3

    N is the number of the tool group to be written.

    grpinfo3 in

    Pointer to the IODBTGI3 structure to set the tool group information. The IODBTGI3 structure is as follows.

    typedef struct iodbtgi {
        short      s_grp;          /* start group number */
        short      dummy;          /* unused */
        short      e_grp;          /* end group number */
        long       life_rest[N];   /* rest counter */
    } IODBTGI3 ; /* N is the number of tool group to be written. */
    
    s_grp
    Specify the start tool group number.
    e_grp
    Specify the end tool group number.
    life_rest[i]
    Specify the rest counter.


    ERRORS

    Code Description
    EW_LENGTH data block length error
    Size of IODBTGI3 structure(length) is wrong.
    EW_NUMBER data number error
    The specification of tool group number (s_grp,e_grp) is wrong.
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Completion status other than EW_DATA
    1 : Rest counter value(life_rest) error
    2 : Rest counter value(life_rest) error(The rest counter is larger than tool life value.)
    And Tool group number including incorrect data will be set onto the member, err_dtno of ODBERR.
    EW_NOOPT no option
    The tool life management B function and the extended driver/library function are necessary.(16i/18i only)
    The tool life management function and the extended driver/library function is necessary.(0i-F, 30i only)
    EW_PARAM parameter error(0i-F, 30i only)
    The tool life management B function and reset counter are necessary.
    EW_REJECT CNC execution rejected
    Cannot write as the executing, selecting or buffering group.

    toolmng\cnc_btlfpotsrh

    Searches the empty pot in the same magazine based on the specified pot position.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_btlfpotsrh( unsigned short FlibHndl, short type, short magnum, short geomnum, short *potnum );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    type in

    Specify the search direction of empty pot.

    -1 descending order.
    0 nearest to the current position.
    1 ascending order.
    magnum in

    Specify the magazine number for search object.

    geomnum in

    Specify the tool geometry number of tool which wants to be stored.

    potnum in/out

    Specify the pointer to the current pot number.
    Set the pot number to the data specified with the pointer beforehand.
    Searches the empty pot according to the specified direction(type) based on the specified pot number(potnum).
    The searched pot number is returned to "*potnum" when the execution of this function ends.


    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_NUMBER Search direction(type) is wrong.
    EW_DATA Magazine number, pot number or tool geometry number is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 error except EW_DATA
    21 error of magazine number
    22 error of pot number
    26 error of tool geometry number
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management function for oversize tools function are necessary.
    EW_OVRFLOW Empty pot does not exist.

    toolmng\cnc_delmag_property

    Deletes the magazine property data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY2 * magprty );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    The pointer to the number of deleting data. ("1"-"8")
    When all data is deleted, "-1" is set.

    The magazine property data that belongs to one magazine number is counted by the set with one deleting number.
    The number of data actually deleted is returned to "*data_num" when the execution of this function ends.

    magprty in/out

    The pointer to the structure that storage the magazine property data. When the number of deleting data ("data_num") is not "-1", set the to the structure data of "mag" beforehand. IODBMAGPRTY2 structure is as follows.

    typedef struct  iodbmagprty2 {
        short           mag ;           /* Magazine number */
        short           reserve ;       /* Reserved        */
    } IODBMAGPRTY2;
    

    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Delete number(data_num) is wrong.
    EW_NUMBER Magazine number(magprty.mag) is wrong.
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_delmagazine

    Deletes the registered Tool management data number from the Magazine management table.

    This function searches at the Magazine management table using the magazine number, pot number. And if it finds, it deletes the Tool management data number from the matched entry.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG2 *mag);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    Specify the pointer to the number of the deleting data for the deletion from the Magazine management table. Set the number of the deleting data(1...) to the pointed data before calling this function.

    After the execution of this function, *data_num holds the real deleted number of data.

    mag in

    Specify the pointer to IODBTLMAG2 structure which is used for searching the Tool management data number to be deleted. The IODBTLMAG2 structure is as follows.

    typedef struct  iodbtlmag2 {
        short magazine;     /* magazine number */
        short pot;          /* pot number */
    } IODBTLMAG2;
    
    magazine
    specifies magazine number.
    (Setting range: 1,..,4, 11,..,14, 21,..,24)
    pot
    specifies pot number.
    (Setting range: According to CNC option and CNC parameter)


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_DATA The member in the IODBTLMAG2 structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    21 : error of magazine number
    22 : error of pot number
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Magazine management data table is write protected.

    toolmng\cnc_delpot_property

    This function deletes the pot property data within the range specified by "s_number" and "data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_delpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    magazine in

    Specify the deleting magazine number ("1"-"8").
    When all data is deleted, "-1" is set.

    s_number in

    Specify the start number of the deleting pot type.

    data_num in/out

    The pointer to the number of deleting data.

    The pot property data that belongs to one pot type is counted by the set with one deleting number.
    Set the number of deleting data to the data specified with the pointer beforehand.
    The pot property data of the number of "*data_num" are deleted from the data number which is specified by "s_number".
    The number of data actually deleted is returned to "*data_num" when the execution of this function ends.


    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Deleting number(data_num) is wrong.
    EW_NUMBER Start number(s_number) is wrong.
    EW_ATTRIB Magazine number(magazine) is wrong.
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_deltool

    Deletes the Tool management data which is specified by the start data number and the number of the data from the Tool management data table.

    Deletion by this function is done sequentially one by one. Once the error occurs, succeeding deletion is aborted.

    When the Tool management data is deleted normally from the Tool management data table by this function, the tool number is also deleted from the Magazine management table by the CNC process.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_deltool(unsigned short FlibHndl,short s_number, short *data_num);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start data number for the deletion from the Tool management data table.

    data_num in/out

    Specify the pointer to the number of the deleting data for the deletion from the Tool management data table. Set the number of the deleting data(1...) to the pointed data before calling this function.

    This function deletes the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real deleted number of data.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_NUMBER The start data number for the Tool management data table(s_number) is invalid. Or, valid number of the data on the Tool management data table exceeds.
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.

    toolmng\cnc_rdmag_property

    Reads the magazine property data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY * magprty );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    The pointer to the number of reading data. ("1"-"8")
    When all data is read, "-1" is set.

    The magazine property data that belongs to one magazine number is counted by the set with one reading number.
    Set the number of reading data to the data specified with the pointer beforehand.
    The number of data actually read is returned to "*data_num" when the execution of this function ends.

    magprty in/out

    The pointer to the structure that storage the magazine property data.
    IODBMAGPRTY structure is as follows.
    When the number of reading data ("data_num") is not "-1", set the reading magazine numberto the structure data of "mag" beforehand.

    typedef struct  iodbmagprty {
        short           mag ;           /* Magazine number           */
        short           reserve ;       /* Reserved                  */
        unsigned char   mag_info ;      /* Magazine information data */
        char            reserve[3] ;    /* Reserved                  */
        short           mt_line ;       /* Matrix line number        */
        short           mt_row ;        /* Matrix line number        */
        long            cstm[4] ;       /* Customize data            */
    } IODBMAGPRTY;
    

    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Reading number(data_num) is wrong.
    EW_NUMBER Magazine number(magprty.mag) is wrong.
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_rdmagazine

    Reads the registered Tool management data number from the Magazine management table.

    This function searches at the Magazine management table using the magazine number, pot number. And if it finds, it reads the Tool management data number from the matched entry.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG *mag);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    Specify the pointer to the number of the reading data for reading from the Magazine management table. Set the number of the reading data(1...) to the pointed data before calling this function.

    After the execution of this function, *data_num holds the real read number of data.

    mag in/out

    Specify the pointer to IODBTLMAG structure including the Tool management data number to be read. The IODBTLMAG structure is as follows.

    typedef struct  iodbtlmag {
        short magazine;     /* magazine number */
        short pot;          /* pot number */
        sshort tool_index;  /* tool management data number */
    } IODBTLMAG;
    
    magazine
    specifies magazine number.
    (Setting range: 1,..,4, 11,..,14, 21,..,24)
    pot
    specifies pot number.
    (Setting range: According to CNC option and CNC parameter)
    tool_index
    When this function terminates normally, tool management data number is returned.
    When the pot is occupied by oversize tools, -1 is returned. (Tool management function oversize tools support option)
    When the pot is a reserved origin pot of the tool storage position reservation, -2 is returned. (FS0i-F,FS30i: Tool management expansion B option)


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_DATA The member in the IODBTLMAG structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    21 : error of magazine number
    22 : error of pot number
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.

    toolmng\cnc_rdpot_property

    This function reads the pot property data within the range specified by "s_number" and "data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num, IODBPOTPRTY * potprty );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    magazine in

    Specify the reading magazine number("1"-"8").

    s_number in

    Specify the start number of the reading pot type.

    data_num in/out

    The pointer to the number of reading data.

    The pot property data that belongs to one pot type is counted by the set with one reading number.
    Set the number of reading data to the data specified with the pointer beforehand.
    The pot property data of the number of "*data_num" are read from the data number which is specified by "s_number".
    The number of data actually read is returned to "*data_num" when the execution of this function ends.

    potprty out

    The pointer to the structure that storage the pot property data.
    IODBPOTPRTY structure is as follows.

    typedef struct  iodbpotprty {
        short           tool_no         /* Tool control number   */
        short           pot_type ;      /* Pot type              */
        unsigned char   pot_info1 ;     /* Pot information data1 */
        unsigned char   pot_info2 ;     /* Pot information data2 */
        char            reserve[2] ;    /* Reserved              */
        long            cstm[10] ;      /* Customize data        */
    } IODBPOTPRTY;
    

    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Reading number(data_num) is wrong.
    EW_NUMBER Start number(s_number) iswrong.
    EW_ATTRIB Magazine number(magazine) is wrong.
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_rdtool

    Reads the Tool management data which is specified by the start data number and the number of the data from the Tool management data table.

    Reading by this function is done sequentially one by one. Once the error occurs, succeeding reading is aborted.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtool(unsigned short FlibHndl,short s_number, short *data_num,IODBTLMNG *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start data number for reading from the Tool management data table.

    data_num in/out

    Specify the pointer to the number of the reading data for reading from the Tool management data table. Set the number of the reading data(1...) to the pointed data before calling this function.

    This function reads the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real read number of data.

    tool out

    Specify the pointer to IODBTLMNG structure including the Tool management data to be read. As for the IODBTLMNG structure, refer to the explanation of arguments of cnc_regtool function.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The start data number for the Tool management data table(s_number) is invalid. Or, valid number of the data on the Tool management data table exceeds.
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.

    toolmng\cnc_rdtool_f2

    Reads the Tool management data which is specified by the start data number and the number of the data from the Tool management data table.

    Reading by this function is done sequentially one by one. Once the error occurs, succeeding reading is aborted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtool_f2(unsigned short FlibHndl, short s_number, short *data_num,IODBTLMNG_F2 *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start data number for reading from the Tool management data table.

    data_num in/out

    Specify the pointer to the number of the reading data for reading from the Tool management data table. Set the number of the reading data(1...) to the pointed data before calling this function.

    This function reads the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real read number of data.

    tool out

    Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be read. As for the IODBTLMNG_F2 structure, refer to the explanation of arguments of cnc_regtool_f2 function.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The start data number for the Tool management data table(s_number) is invalid. Or, valid number of the data on the Tool management data table exceeds.
    EW_NOOPT No option
    The Tool management function and the extended driver/library function are necessary.

    toolmng\cnc_rdtoolgeom_tlm

    The tool geometry data of number specified by datanum is read from the tool geometry data number specified by snum.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdtoolgeom_tlm(unsigned short FlibHndl, short snum, short *datanum, IODBTLGEOM *tool) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    snum in

    Specify the reading start tool geometry data number.

    datanum in/out

    Specify the pointer to the number(1-) of the writing data.
    The number shown by datanum is read from snum. The number which was actually read is returned.

    tool out

    The pointer to the IODBTLGEOM structure which stores the tool geometry data.
    Refer to the description of cnc_wrtoolgeom_tlm for IODBTLGEOM structure.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The value of snum is wrong.
    EW_LENGTH The value of datanum is wrong.
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs and Tool management function oversize tools support option.

    toolmng\cnc_reg_toolstrage

    Storage position of magazine number and pot number is registered or released to tool management data.


    By specifying the storage position of magazine/pot for the tool, tool can be return the original position after moving to spindle position or stand by position.


    Magazine/pot which is specified as storage position cannot attach other tool.

    Specify the registration with attaching the tool to storage position.

    Specify the release with attaching the tool to storage position.


    It is possible to register storage position for all tools in a magazine.

    It is possible to register storage position for all tools in all magazines.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_regmagazine( unsigned short FlibHndl, unsigned char mode, IODBTLMAG *mag );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    mode in

    Specify the Registration or Release of Tool storage position of specified magazine/pot.

    0 : Registration
    1 : Release
    mag in

    Specify the pointer to IODBTLMAG structure including the Tool management data number to be registered/released. The IODBTLMAG structure is as follows.

    typedef struct  iodbtlmag {
        short magazine;     /* magazine number */
        short pot;          /* pot number */
        short tool_index;   /* tool management data number */
    } IODBTLMAG;
    
    magazine
    specifies magazine number.
    (Setting range : 1,..,4, 11,..,14, 21,..,24)
    pot
    specifies pot number.
    (Setting range: According to CNC option and CNC parameter)
    tool_index
    specifies tool management data number
    magazine
    specifies magazine number.
    When all magazine and pot to which tool is attached is specified, set '-1' to magazine number.
    When all magazine or all pots in magazine is specified, the following items are ignored.
    - Magazine/pot to which tool is not attached.
    - Specify of arguments and tool management number.
    pot
    Specify pot number
    When all pot in a magazine is specified, set '-1' to pot number.
    tool_index
    Specify the tool management number of Tool storage position for specified magazine/pot.
    When Tool storage position is released, this argument need not be specified.


    ERRORS

    Code Description
    EW_DATA The member in the IODBTLMAG structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    17 : error of magazine number
    18 : error of pot number
    27 : Registration is commanded to the magazine/pot which is already registered as Tool storage position for other tool.
    EW_NOOPT No option
    Tool pair for tool management function: 64 pairs, 240pair or 1000pair and tool management expansion B is necessary.
    EW_PROT Write protection
    Tool management data table is write protected.
    EW_REJECT CNC execution rejected
    The storage position of magazine and pot cannot be registered. There is no tool in specified pot.
    EW_OVRFLOW Data of multi edge tool has a part of inconsistency on tool management funcion. (only 0i-F,30i/31i/32i)

    toolmng\cnc_regmagazine

    Registers the Tool management data number to the Magazine management table.

    This function searches at the Magazine management table using the magazine number, pot number. And if it finds, it writes the Tool management data number to the matched entry.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_regmagazine(unsigned short FlibHndl,short *data_num, IODBTLMAG *mag);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    Specify the pointer to the number of the registration data for the registration to the Magazine management table. Set the number of the registration data(1...) to the pointed data before calling this function.

    After the execution of this function, *data_num holds the real registered number of data.

    mag in

    Specify the pointer to IODBTLMAG structure including the Tool management data number to be registered. The IODBTLMAG structure is as follows.

    typedef struct  iodbtlmag {
        short magazine;     /* magazine number */
        short pot;          /* pot number */
        short tool_index;   /* tool management data number */
    } IODBTLMAG;
    
    magazine
    specifies magazine number.
    (Setting range : 1,..,4, 11,..,14, 21,..,24)
    pot
    specifies pot number.
    (Setting range: According to CNC option and CNC parameter)
    tool_index
    specifies tool management data number


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_DATA The member in the IODBTLMAG structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    21 : error of magazine number
    22 : error of pot number
    23 : error of tool management data number
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Magazine management data table is write protected.
    EW_REJECT CNC execution rejected
    This function tries to register the data against the Magazine management data table entry which has already existed or interfere with other tool.
    EW_OVRFLOW Data of multi edge tool has a part of inconsistency on tool management funcion. (only 0i-F, 30i/31i/32i)

    toolmng\cnc_regtool

    Registers the Tool management data which is specified by the start data number and the number of the data to the Tool management data table.

    Registration by this function is done sequentially one by one. Once the error occurs, succeeding registration is aborted.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_regtool(unsigned short FlibHndl,short s_number, short *data_num,IODBTLMNG *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start data number for the registration to the Tool management data table.

    data_num in/out

    Specify the pointer to the number of the registration data for the registration to the Tool management data table. Set the number of the registration data(1...) to the pointed data before calling this function.

    This function registers the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real registered number of data.

    tool in

    Specify the pointer to IODBTLMNG structure including the Tool management data to be registered. The IODBTLMNG structure is as follows.

    typedef struct  iodbtlmng {
        long T_code;                /* tool number(T) */
        long life_count;            /* tool life counter */
        long max_life;              /* maximum of tool life */
        long rest_life;             /* rest of tool life */
        unsigned char  life_stat;   /* state of tool life */
        unsigned char  cust_bits;   /* customizing bit */
        unsigned short tool_info;   /* tool info. */
        short H_code;               /* tool length compensation number (H) */
        short D_code;               /* cutter compensation number (D) */
        long spindle_speed;         /* spindle speed(S) */
        long feedrate;              /* feed rate(F) */
        short magazine;             /* magazine number(read only) */
        short pot;                  /* pot number(read only) */
        short G_code;               /* tool geometric compensation number(G) */
        short W_code;               /* tool wear compensation number(W) */
        short gno;                  /* tool geometric number */
        short grp;                  /* edge group number(only 0i-F, 30i/31i/32i) */
        short edge;                 /* edge number(only 0i-F, 30i/31i/32i) */
        short org_magazine;         /* origin magazine number(only 0i-F, 30i/31i/32i) */
        short org_pot;              /* origin pot number(only 0i-F, 30i/31i/32i) */
        short reserve_s;            /* reserved */
        long reserved[2];           /* reserved */
        long custom1;               /* customizing data 1 */
        long custom2;               /* customizing data 2 */
        long custom3;               /* customizing data 3 */
        long custom4;               /* customizing data 4 */
        long custom5;               /* customizing data 5 */
        long custom6;               /* customizing data 6 */
        long custom7;               /* customizing data 7 */
        long custom8;               /* customizing data 8 */
        long custom9;               /* customizing data 9 */
        long custom10;              /* customizing data 10 */
        long custom11;              /* customizing data 11 */
        long custom12;              /* customizing data 12 */
        long custom13;              /* customizing data 13 */
        long custom14;              /* customizing data 14 */
        long custom15;              /* customizing data 15 */
        long custom16;              /* customizing data 16 */
        long custom17;              /* customizing data 17 */
        long custom18;              /* customizing data 18 */
        long custom19;              /* customizing data 19 */
        long custom20;              /* customizing data 20 */
    } IODBTLMNG;
    
    T_code
    Specify tool number(T).
    (Setting range: 0,..,99999999)
    life_count
    Specify tool life counter.
    (Setting range: 0,..,99999999, Unit: count)
    (Setting range: 0,..,3599999, Unit: sec)
    max_life
    Specify maximum of tool life.
    (Setting range: 0,..,99999999, Unit: count)
    (Setting range: 0,..,3599999, Unit: sec)
    rest_life
    Specify predictive tool life.
    (Setting range: 0,..,99999999, Unit: count)
    (Setting range: 0,..,3599999, Unit: sec)
    life_stat
    Specify state of tool life.
    0 : Tool is not managed
    1 : Unused tool
    2 : Enable to use
    3 : Life is over
    4 : Tool is broken
    cust_bits
    Specify customizing data(bit).
    tool_info
    Specify tool info.
    bit 0 : RGS
    0 : Tool management data is void
    1 : Tool management data is valid
    bit 1 : TIM
    0 : Tool life is specified by count
    1 : Tool life is specified by time
    bit 2 : BDT
    0 : Normal tool
    1 : Big tool
    bit 3 : LOC
    0 : Data accessable
    1 : Data locked
    bit 4,..,15 : Reserved
    H_code
    Specify Tool length compensation number (H).
    (Setting range: 0,..,999)
    D_code
    Specify cutter compensation number (D).
    (Setting range: 0,..,999)
    spindle_speed
    Specify spindle speed(S).
    (Setting range: 0,..,99999, Unit: /min)
    feedrate
    Specify feed rate(F).
    (Setting range: 0,..,99999999, Unit: mm/min, inch/min, deg/min, mm/rev, inch/rev)
    magazine
    magazine number.
    (This data is READ ONLY. So it cannot be used for writing data.)
    pot
    pot number.
    (This data is READ ONLY. So it cannot be used for writing data.)
    G_code
    Specify tool geometric compensation number(G)
    (This data is Turning system only.)
    W_code
    Specify tool wear compensation number(W).
    (This data is Turning system only.)
    gno
    Specify tool geometric number.
    grp
    edge group number.(only 0i-F, 30i/31i/32i)
    edge
    edge number.(only 0i-F, 30i/31i/32i)
    org_magazine
    origin magazine number.(only 0i-F, 30i/31i/32i)
    org_opt
    origin pot number.(only 0i-F, 30i/31i/32i)
    reserve_s
    Reserved.
    reserved[2]
    Reserved.
    custom1,..,custom4
    Specify customizing data 1,..,4.
    (Setting range: -99999999,..,99999999)
    custom5,..,custom20
    Specify customizing data 5,..,20.
    (Setting range: -99999999,..,99999999)
    (These items are available at only the additional customized data on tool management data option.)
    (Note) Magazine number and pot number are read only data, so it is impossible to write data in these.
    (Note) Above customizing data 5 .. customizing data 20 are available at only "extended customization data".
    (Note) "Tool geometric compensation number G" and "tool wear compensation number W" are available only for the Lathe system.

    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_NUMBER The start data number for the Tool management data table(s_number) is invalid. Or, valid number of the data on the Tool management data table exceeds.
    EW_DATA The member in the IODBTLMNG structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of tool number
    2 : error of tool life counter
    3 : error of maximum of tool life
    4 : error of rest of tool life
    5 : error of state of tool life
    7 : error of tool information
    8 : error of tool length compensation number
    9 : error of cutter compensation number
    10 : error of spindle speed
    11 : error of feed rate
    12 : error of tool geometric compensation number
    13 : error of tool wear compensation number
    14 : error of tool geometric number
    15 : error of edge group number(only 0i-F, 30i/31i/32i)
    16 : error of edge number(only 0i-F, 30i/31i/32i)
    17 : error of origin magazine number(only 0i-F, 30i/31i/32i)
    18 : error of origin pot number(only 0i-F, 30i/31i/32i)
    27 : Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
    29 : Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
    31,..,50 : error of customizing data
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.
    EW_REJECT CNC execution rejected
    This function tries to register the data against the Tool management data table entry which has already existed or interfere with other tool.

    toolmng\cnc_regtool_f2

    Registers the Tool management data which is specified by the start data number and the number of the data to the Tool management data table.

    Registration by this function is done sequentially one by one. Once the error occurs, succeeding registration is aborted.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_regtool_f2(unsigned short FlibHndl, short s_number, short *data_num, IODBTLMNG_F2 *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start data number for the registration to the Tool management data table.

    data_num in/out

    Specify the pointer to the number of the registration data for the registration to the Tool management data table. Set the number of the registration data(1...) to the pointed data before calling this function.

    This function registers the number of Tool management data specified by "*data_num", from the index specified by "s_number". After the execution of this function, *data_num holds the real registered number of data.

    tool in

    Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be registered. The IODBTLMNG_F2 structure is as follows.

    typedef struct  iodbtlmng_f2 {
        long T_code;                /* tool number(T) */
        long life_count;            /* tool life counter */
        long max_life;              /* maximum of tool life */
        long rest_life;             /* rest of tool life */
        unsigned char  life_stat;   /* state of tool life */
        unsigned char  cust_bits;   /* customizing bit */
        unsigned short tool_info;   /* tool info. */
        short H_code;               /* tool length compensation number (H) */
        short D_code;               /* cutter compensation number (D) */
        long spindle_speed;         /* spindle speed(S) */
        long feedrate;              /* feed rate(F) */
        short magazine;             /* magazine number(read only) */
        short pot;                  /* pot number(read only) */
        short G_code;               /* tool geometric compensation number(G) */
        short W_code;               /* tool wear compensation number(W) */
        short gno;                  /* tool geometric number */
        short grp;                  /* edge group number(only 0i-F, 30i/31i/32i) */
        short edge;                 /* edge number(only 0i-F, 30i/31i/32i) */
        short org_magazine;         /* origin magazine number(only 0i-F, 30i/31i/32i) */
        short org_pot;              /* origin pot number(only 0i-F, 30i/31i/32i) */
        short reserve_s;            /* reserved */
        long reserved[2];           /* reserved */
        long custom1;               /* customizing data 1  */
        long custom2;               /* customizing data 2  */
        long custom3;               /* customizing data 3  */
        long custom4;               /* customizing data 4  */
        long custom5;               /* customizing data 5  */
        long custom6;               /* customizing data 6  */
        long custom7;               /* customizing data 7  */
        long custom8;               /* customizing data 8  */
        long custom9;               /* customizing data 9  */
        long custom10;              /* customizing data 10 */
        long custom11;              /* customizing data 11 */
        long custom12;              /* customizing data 12 */
        long custom13;              /* customizing data 13 */
        long custom14;              /* customizing data 14 */
        long custom15;              /* customizing data 15 */
        long custom16;              /* customizing data 16 */
        long custom17;              /* customizing data 17 */
        long custom18;              /* customizing data 18 */
        long custom19;              /* customizing data 19 */
        long custom20;              /* customizing data 20 */
        long custom21;              /* customizing data 21 */
        long custom22;              /* customizing data 22 */
        long custom23;              /* customizing data 23 */
        long custom24;              /* customizing data 24 */
        long custom25;              /* customizing data 25 */
        long custom26;              /* customizing data 26 */
        long custom27;              /* customizing data 27 */
        long custom28;              /* customizing data 28 */
        long custom29;              /* customizing data 29 */
        long custom30;              /* customizing data 30 */
        long custom31;              /* customizing data 31 */
        long custom32;              /* customizing data 32 */
        long custom33;              /* customizing data 33 */
        long custom34;              /* customizing data 34 */
        long custom35;              /* customizing data 35 */
        long custom36;              /* customizing data 36 */
        long custom37;              /* customizing data 37 */
        long custom38;              /* customizing data 38 */
        long custom39;              /* customizing data 39 */
        long custom40;              /* customizing data 40 */
    } IODBTLMNG_F2;
    
    (Note) Magazine number and pot number are read only data, so it is impossible to write data in these.
    (Note) Above customizing data(5-20) are available at only "the additional customized data on tool management function option(5-20)".
    (Note) Above customizing data(5-40) are available at only "the additional customized data on tool management function option(5-40)".


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_NUMBER The start data number for the Tool management data table(s_number) is invalid. Or, valid number of the data on the Tool management data table exceeds.
    EW_DATA The member in the IODBTLMNG_F2 structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of tool number
    2 : error of tool life counter
    3 : error of maximum of tool life
    4 : error of rest of tool life
    5 : error of state of tool life
    7 : error of tool information
    8 : error of tool length compensation number
    9 : error of cutter compensation number
    10 : error of spindle speed
    11 : error of feed rate
    12 : error of tool geometric compensation number
    13 : error of tool wear compensation number
    14 : error of tool geometric number
    15 : error of edge group number(only 0i-F, 30i/31i/32i)
    16 : error of edge number(only 0i-F, 30i/31i/32i)
    17 : error of origin magazine number(only 0i-F, 30i/31i/32i)
    18 : error of origin pot number(only 0i-F, 30i/31i/32i)
    27 : Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
    29 : Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
    31,..,70 : error of customizing data
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.
    EW_REJECT CNC execution rejected
    This function tries to register the data against the Tool management data table entry which has already existed or interfere with other tool.

    toolmng\cnc_tool_move

    The tool management data number is moved specifying the magazine number and the pot number of the source and the destination.

    When Tool Management Function Tool storage position reservation is valid, an empty pot or the origin position registered into the tool which moves can be specified for the moving destination.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_tool_move( unsigned short FlibHndl, IODBTLMAG2 *src_mag, IODBTLMAG2 *dest_mag );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    src_mag in

    Specify the pointer to IODBTLMNG2 structure including the source magazine and pod to be registered.

    dest_mag in

    Specify the pointer to IODBTLMNG2 structure including the destination magazine and pod to be registered. The IODBTLMAG2 structure is as follows.

    typedef struct  iodbtlmag2 {
        short magazine;     /* magazine number */
        short pot;          /* pot number */
    } IODBTLMAG2;
    
    magazine
    specifies magazine number.
    (Setting range: 1,..,4, 11,..,14, 21,..,24)
    pot
    specifies pot number.
    (Setting range: According to CNC option and CNC parameter)


    ERRORS

    Code Description
    EW_DATA The member in the IODBTLMAG2 structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of source magazine number
    2 : error of source pot number
    3 : no tool in source magazine and pot
    4 : error of destination magazine number
    5 : error of destination pot number
    6 : There is tool in destination magazine and pot
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Magazine management data table is write protected.
    EW_REJECT When tool is moved to destination magazine and pot the tool interferes with other tool(When Oversize tools function is effective)

    toolmng\cnc_wrmag_property

    Writes the magazine property data.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmag_property( unsigned short FlibHndl, short *data_num, IODBMAGPRTY * magprty );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    data_num in/out

    The pointer to the number of writing data. ("1"-"8")
    When all data is written, "-1" is set.

    The magazine property data that belongs to one magazine number is counted by the set with one writing number.
    Set the number of writing data to the data specified with the pointer beforehand.
    The number of data actually written is returned to "*data_num" when the execution of this function ends.

    magprty in

    The pointer to the structure that storage the magazine property data.
    IODBMAGPRTY structure is as follows.

    typedef struct  iodbmagprty {
        short           mag ;           /* Magazine number           */
        short           reserve ;       /* Reserved                  */
        unsigned char   mag_info ;      /* Magazine information data */
        char            reserve[3] ;    /* Reserved                  */
        short           mt_line ;       /* Matrix line number        */
        short           mt_row ;        /* Matrix line number        */
        long            cstm[4] ;       /* Customize data            */
    } IODBMAGPRTY;
    

    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Writing number(data_num) is wrong.
    EW_NUMBER Magazine number(magprty.mag) is wrong.
    EW_DATA The member in the IODBMAGPRTY structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 error except EW_DATA
    1 error of magazine information data.
    11-14 error of customize data1-4.
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_wrmagazine

    Writes the Tool management data number to the entry of the Magazine management table specified by magazine number and pot number.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmagazine(unsigned short FlibHndl,short magazine, short pot,short tool_index);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    magazine in

    Specify magazine number.
    (Setting range: 1,..,4, 11,..,14, 21,..,24)

    pot in

    Specify pot number.
    (Setting range: According to CNC option and CNC parameter)

    tool_index in

    Specify the Tool management data number.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_DATA The argument is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    21 : error of magazine number
    22 : error of pot number
    23 : error of tool management data number
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Magazine management data table is write protected.
    EW_REJECT Interference with other tool.
    EW_OVRFLOW Data of multi edge tool has a part of inconsistency on tool management funcion. (only 0i-F, 30i/31i/32i)

    toolmng\cnc_wrpot_property

    This function writes the pot property data within the range specified by "s_number" and "data_num".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrpot_property( unsigned short FlibHndl, short magazine, short s_number, short *data_num, IODBPOTPRTY * potprty );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    magazine in

    Specify the writing magazine number("1"-"8").

    s_number in

    Specify the start number of the writing pot type.

    data_num in/out

    The pointer to the number of writing data.

    The pot property data that belongs to one pot type is counted by the set with one writing number.
    Set the number of writing data to the data specified with the pointer beforehand.
    The pot property data of the number of "*data_num" are written from the data number which is specified by "s_number".
    The number of data actually written is returned to "*data_num" when the execution of this function ends.

    potprty out

    The pointer to the structure that storage the pot property data.
    IODBPOTPRTY structure is as follows.

    typedef struct  iodbpotprty {
        short           tool_no         /* Tool control number   */
        short           pot_type ;      /* Pot type              */
        unsigned char   pot_info1 ;     /* Pot information data1 */
        unsigned char   pot_info2 ;     /* Pot information data2 */
        char            reserve[2] ;    /* Reserved              */
        long            cstm[10] ;      /* Customize data        */
    } IODBPOTPRTY;
    

    ERRORS

    Code Description
    EW_BUSY Wait until the completion of CNC processing, or retry.
    EW_LENGTH Writing number(data_num) is wrong.
    EW_NUMBER Start number(s_number) is wrong.
    EW_ATTRIB Magazine number(magazine) is wrong.
    EW_DATA The member in the IODBPOTPRTY structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 error except EW_DATA
    1 error of tool control number
    2 error of pot type
    3 error of pot information data1
    4 error of Pot information data2
    11-20 error of customize data 1-10.
    100 tool interfarence
    101 Illigal multi edge
    EW_NOOPT No option
    The Tool management function 64-pairs, 240-pairs or 1000 pairs and the tool management extension B function are necessary.

    toolmng\cnc_wrtool

    Writes the specified Tool management data to the Tool management data table. In case of writing the individual data on the Tool management data, use cnc_wrtool2 function.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtool(unsigned short FlibHndl,short number, IODBTLMNG *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the data number at the Tool management data table.

    tool in

    Specify the pointer to IODBTLMNG structure including the Tool management data to be written. As for the IODBTLMNG structure, refer to the explanation of arguments of cnc_regtool function.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The data number for the Tool management data table(number) is invalid.
    EW_DATA The member in the IODBTLMNG structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of tool number
    2 : error of tool life counter
    3 : error of maximum of tool life
    4 : error of rest of tool life
    5 : error of state of tool life
    7 : error of tool information
    8 : error of tool length compensation number
    9 : error of cutter compensation number
    10 : error of spindle speed
    11 : error of feed rate
    12 : error of tool geometric compensation number
    13 : error of tool wear compensation number
    14 : error of tool geometric number
    15 : error of edge group number(only 0i-F, 30i/31i/32i)
    16 : error of edge number(only 0i-F, 30i/31i/32i)
    17 : error of origin magazine number(only 0i-F, 30i/31i/32i)
    18 : error of origin pot number(only 0i-F, 30i/31i/32i)
    27 : Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
    29 : Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
    31,..,50 : error of customizing data
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.
    EW_REJECT Interference with other tool.

    toolmng\cnc_wrtool2

    Writes the individual data on the Tool management data to the specified Tool management data table.

    Note) This function is only for "Fast Ethernet board" and "Embedded Ethernet". So, this function is not supported at "Ethernet board".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtool2(unsigned short FlibHndl,short number, IDBTLM *wrtool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the data number at the Tool management data table.

    wrtool in

    Specify the pointer to IDBTLM structure including the Tool management data to be written. The IDBTLM structure is as follows.

    typedef struct  idbtlm {
        short data_id;              /* specified data ID */
        union {
            unsigned char data1;    /* 1byte type data */
            short         data2;    /* 2byte type data */
            long          data4;    /* 4byte type data */
        } item;
    } IDBTLM;
    
    data_id
    Identifies the Tool management data to be written. The correspondence between the ID and the variable for the data is as follows.
    Name data_id variable for item
    Tool number(T) 1 data4
    Tool life counter 2 data4
    Maximum of tool life 3 data4
    Rest of tool life 4 data4
    State of tool life 5 data1
    Customizing data (bit) 6 data1
    Tool information 7 data2
    Tool length compensation number (H) 8 data2
    Cutter compensation number (D) 9 data2
    Spindle speed (S) 10 data4
    Feed rate (F) 11 data4
    Tool geometric compensation number (G) 12 data2
    Tool wear compensation number (W) 13 data2
    Tool geometric number 14 data2
    Edge group number(only 0i-F, 30i/31i/32i) 15 data2
    Edge number(only 0i-F, 30i/31i/32i) 16 data2
    Origin magazine number(only 0i-F, 30i/31i/32i) 17 data2
    Origin pot number(only 0i-F, 30i/31i/32i) 18 data2
    Customizing data 1 31 data4
    Customizing data 2 32 data4
    Customizing data 3 33 data4
    Customizing data 4 34 data4
    Customizing data 5 35 data4
    : : :
    Customizing data 40 70 data4
    (Note) Above customizing data(5-20) are available at only "the additional customized data on tool management function option(5-20)".
    (Note) Above customizing data(5-40) are available at only "the additional customized data on tool management function option(5-40)".


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed the same data window. Try this function again.
    EW_NUMBER The data number for the Tool management data table(number) is invalid.
    EW_ATTRIB The data_id at IDBTLM structure is invalid.
    EW_DATA The member, item.data1, item.data2, item.data4, in the IDBTLM structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of tool number
    2 : error of tool life counter
    3 : error of maximum of tool life
    4 : error of rest of tool life
    5 : error of state of tool life
    7 : error of tool information
    8 : error of tool length compensation number
    9 : error of cutter compensation number
    10 : error of spindle speed
    11 : error of feed rate
    12 : error of tool geometric compensation number
    13 : error of tool wear compensation number
    14 : error of tool geometric number
    15 : error of edge group number (only 0i-F, 30i/31i/32i)
    16 : error of edge number (only 0i-F, 30i/31i/32i)
    17 : error of origin magazine number(only 0i-F, 30i/31i/32i)
    18 : error of origin pot number(only 0i-F, 30i/31i/32i)
    27 : Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
    29 : Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
    31,..,70 : error of customizing data
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.
    EW_REJECT Interference with other tool.
    EW_OVRFLOW Data of multi edge tool has a part of inconsistency on tool management funcion. (only 0i-F, 30i/31i/32i)

    toolmng\cnc_wrtool_f2

    Writes the specified Tool management data to the Tool management data table. In case of writing the individual data on the Tool management data, use cnc_wrtool2_f2 function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtool_f2(unsigned short FlibHndl, short number, IODBTLMNG_F2 *tool);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    Specify the data number at the Tool management data table.

    tool in

    Specify the pointer to IODBTLMNG_F2 structure including the Tool management data to be written. As for the IODBTLMNG_F2 structure, refer to the explanation of arguments of cnc_regtool_f2 function.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The data number for the Tool management data table(number) is invalid.
    EW_DATA The member in the IODBTLMNG_F2 structure is invalid.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : error of tool number
    2 : error of tool life counter
    3 : error of maximum of tool life
    4 : error of rest of tool life
    5 : error of state of tool life
    7 : error of tool information
    8 : error of tool length compensation number
    9 : error of cutter compensation number
    10 : error of spindle speed
    11 : error of feed rate
    12 : error of tool geometric compensation number
    13 : error of tool wear compensation numbr
    14 : error of tool geometric number
    15 : error of edge group number(only 0i-F, 30i/31i/32i)
    16 : error of edge number(only 0i-F, 30i/31i/32i)
    17 : error of origin magazine number(only 0i-F, 30i/31i/32i)
    18 : error of origin pot number(only 0i-F, 30i/31i/32i)
    27 : Registered magazine and pot number were specified.(only 0i-F, 30i/31i/32i)
    29 : Multi edge data is illegal.(Data of multi edge tool has a part of inconsistency on tool management funcion.)(only 0i-F, 30i/31i/32i)
    31,..,70 : error of customizing data
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs.
    EW_PROT Write protection
    The Tool management data table is write protected.
    EW_REJECT Interference with other tool.

    toolmng\cnc_wrtoolgeom_tlm

    The tool geometry data of number specified by datanum is written from the tool geometry data number specified by snum.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrtoolgeom_tlm(unsigned short FlibHndl, short snum, short *datanum, IODBTLGEOM *tool) ;


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    snum in

    Specify the writing start tool geometry data number.

    datanum in/out

    Specify the pointer to the number(1-) of the writing data.
    The number shown by datanum is written from snum. The registered number which was actually written is returned.

    tool in

    The pointer to the IODBTLGEOM structure which stored the tool geometry data.
    The IODBTLGEOM structure is as follows.

    typedef struct  tlmngtlgeom {
        unsigned char l_pot_num;    /* Left pot occupation unit */
        unsigned char r_pot_num;    /* Right pot occupation unit */
        unsigned char u_pot_num;    /* Upper pot occupation unit (0i-F, 30i/31i/32i only) */
        unsigned char d_pot_num;    /* Lower pot occupation unit (0i-F, 30i/31i/32i only) */
        unsigned char tl_geom_num ; /* Geometry A or B (0i-F, 30i/31i/32i only) */
    } IODBTLGEOM;  
    
    Specify the value of range 0 to 4 for l_pot_num, r_pronum, u_pot_num and d_pot_num.(1 unit = 0.5 pot)
    specify 0 for figure A, or 1 for figure B for tl_geom_num.


    ERRORS

    Code Description
    EW_BUSY Other users(such as PMC) have accessed to the same data window. Try this function again.
    EW_NUMBER The value of snum is wrong.
    EW_LENGTH The value of datanum is wrong.
    EW_DATA The member in the IODBTLGEOM structure is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following detail status will be set onto the member, err_no of ODBERR structure.
    0 error except EW_DATA
    1 Left pot occupation unit is wrong.
    2 Right pot occupation unit is wrong.
    3 Upper pot occupation unit is wrong.
    4 Lower pot occupation unit is wrong.
    5 Geometry A or B is wrong.
    EW_NOOPT No option
    The Tool management function 64 pairs, or the Tool management function 240 pairs, or the Tool management function 1000 pairs and Tool management function oversize tools support option.
    EW_PROT Write protection
    The tool geometry data has already been registered in the tool stored in the pot.

    unsolic\cnc_rdunsolicmsg

    Reads the unsolicited messaging data. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    This function does not have the argument, library handle "FlibHndl".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdunsolicmsg( short bill, IDBUNSOLICMSG *data );


    ARGUMENTS

    Name Direction Description
    bill in

    Handle for the Message data reading. Specify the value acquired by the cnc_unsolicstart or the value notified by the argument(lParam) of the message reception function.

    data out

    Pointer to IDBUNSOLICMSG structure in which the unsolicited messaging data will be stored.

    The IDBUNSOLICMSG structure is as follows.
    typedef struct idbunsolicmsg {
        short   getno ;
        struct {
            short   rdsize ;
            void    *data ;
        } msg[3] ;
    } IDBUNSOLICMSG ;
    
    getno
    Number of the Message data which was acquired by the unsolicited messaging. (1-3).
    rdsize
    Size of PMC data which was transmitted by the unsolicited messaging. (byte)
    data
    Specify the pointer to the buffer in which the PMC data which was transmitted is stored. The size of this area must ensure the size which has been specified as "rdsize" at cnc_wrunsolicprm.
    Setting example)
    IP address : 192.168.0.1
    TCP port number : 8196
    PMC address : R2000
    Retry number : 3
    Timeout : 10 sec
    Transmission data : 2
    1st message : R2100-2149
    2nd message : D110-149

    IDBUNSOLICMSG data;
    char msg1[50];
    char msg2[40];
    data.msg[0].data = msg1; // Contents of R2100-2149
    data.msg[1].data = msg2; // Contents of D110-149

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_DATA The message corresponding to the handle(bill) has not been transmitted.

    unsolic\cnc_rdunsolicmsg2

    Reads the unsolicited messaging data. This function is available only for Series Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    This function does not have the argument, library handle "FlibHndl".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdunsolicmsg2( short bill, IDBUNSOLICMSG2 *data2 );


    ARGUMENTS

    Name Direction Description
    bill in

    Handle for the Message data reading. Specify the value acquired by the cnc_unsolicstart or the value notified by the argument(lParam) of the message reception function.

    data out

    Pointer to IDBUNSOLICMSG2 structure in which the unsolicited messaging data will be stored.

    The IDBUNSOLICMSG2 structure is as follows.

    typedef struct idbunsolicmsg2 {
        unsigned short      getnum;
        char                dummy[2];
        UNSOLICMSG_TYPE_MSG get[3];
    } IDBUNSOLICMSG2 ;
    
    typedef struct unsolicmsg_type_msg {
        unsigned short      type;
        char                dummy1[2];
        union {
            typedef {
                unsigned short  path;
                char            dummy2[2];
                unsigned long   size;
                void            *data;
            } pmc;
            typedef {
                unsigned short  path;
                char            dummy3[2];
                unsigned long   num;
                void            *data;
            } macro;
        } msg;
    } UNSOLICMSG_TYPE_MSG ;
    
    getnum
    Acquired message number
    Number of the Message data which was acquired by the unsolicited messaging.
    Range) 1 - 3
    get[n].msg.type
    Kind of the unsolicited messaging data.
    1 : PMC data
    3 : Custom macro variables
    4 : Temporary RTM variables
    5 : Permanent RTM variables(0i-F,30i/31i/32i only)
    get[n].msg.pmc.path
    Unit type number of PMC
    When the value of "Kind of the unsolicited messaging data" is "1", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.)
    get[n].msg.pmc.size
    The size of PMC data (bytes)
    When the value of "Kind of the unsolicited messaging data" is "1", this value is effective.
    Range) (The range depends on an effective PMC area and transmission number.)
    get[n].msg.pmc.data
    Pointer to the buffer where PMC data is stored.
    The size specified by "PMC size of the parameter for the transmission (byte)" of cnc_wrunsolicprm2 function is necessary for the size of this data.
    When the value of "Kind of the unsolicited messaging data" is "1", this value is effective.
    get[n].msg.macro.path
    Path number of CNC
    When the value of "Kind of the unsolicited messaging data" is "3", "4" and "5", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.)
    get[n].msg.macro.num
    Number of Macro variable data
    When the value of "Kind of the unsolicited messaging data" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective Macro variable data and transmission number.)
    get[n].msg.macro.data
    Pointer to the buffer where Macro variable data is stored.
    The size specified by "Number of macro variables of the parameter for the transmission" of cnc_wrunsolicprm2 function is necessary for the size of this data.
    When the value of "Kind of the unsolicited messaging data" is "3", "4" and "5", this value is effective.
    Setting example)
    IP address : 192.168.0.1
    Port number : 8196
    Control method : Simple method
    Conterl parameter : PMC address"1:R2000"
    Retry number : 3
    Timeout : 10 sec
    Transmission number : 3
    Parameter for transmission[0] : PMC area"1:R2100-1:R2149"
    Parameter for transmission[1] : Custom macro variables"1:3011"
    Parameter for transmission[2] : Temporary RTM variables"1:0-1:4"

    IDBUNSOLICMSG2 data2;
    char msg1[50]; // stored buffer for msg1
    double msg2[2]; // stored buffer for msg2
    double msg3[5]; // stored buffer for msg3
    data2.get[0].msg.pmc.data = msg1; // Contents of 1:R2100-1:2149
    data2.get[1].msg.macro.data = msg2; // Contents of 1:3011
    data2.get[2].msg.macro.data = msg3; // Contents of 1:0-1:4

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_DATA The message corresponding to the handle(bill) has not been transmitted.

    unsolic\cnc_rdunsolicprm

    Reads the parameter for unsolicited messaging from CNC. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    It is necessary to execute cnc_unsolicstart and make the parameter effective before reading the parameters by this function. So, when this function is called just after the parameters are set by the cnc_wrunsolicprm, the correct value cannot be read.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdunsolicprm( unsigned short FlibHndl, short number, IODBUNSOLIC *data );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

    data out

    Pointer to IODBUNSOLIC structure in which the parameter for the unsolicited messaging will be stored.

    The IODBUNSOLIC structure is as follows.
    typedef struct iodbunsolic {
        char            ipaddr[16] ;
        unsigned short  port ;
        short           reqaddr ;
        short           pmcno ;
        short           retry ;
        short           timeout ;
        short           alivetime;
        short           setno ;
        union {
            struct {
                short   type ;
                short   rdaddr ;
                short   rdno ;
                short   rdsize ;
            } pmc ;
            struct {
                short   type ;
                long    dummy1 ;
                short   dummy2 ;
            } dmy ;
        } rddata[3] ;
    } IODBUNSOLIC ;
    ipaddr
    IP address of destination PC.
    port
    TCP port number of destination PC.
    reqaddr
    PMC address type for the data transmission control.
    5 : R (Internal relay)
    12 : E (Extended relay)
    pmcno
    PMC address number for the data transmission control.
    retry
    Number of transmission retry to observe communication board transmits data.
    timeout
    Timeout time(sec) to observe communication board transmits data.
    alivetime
    The interval time(sec)of the existence signals which are transmitted while communication board operates.
    setno
    Number of the Message data to be transmitted. (1-3).
    type
    The type of the transmission data. (=1).
    rdaddr
    PMC address which becomes the contents of Message data.
    0 : G (Signal to PMC->CNC)
    1 : F (Signal to CNC->PMC)
    2 : Y (Signal to PMC->machine)
    3 : X (Signal to machine->PMC)
    4 : A (Message demand)
    5 : R (Internal relay)
    6 : T (Changeable timer)
    7 : K (Keep relay)
    8 : C (Counter)
    9 : D (Data table)
    10 : M (Input signal from other devices)
    11 : N (Output signal to other devices)
    12 : E (Extended relay)
    rdno
    Start address number of PMC data which becomes the contents of Message data.
    rdsize
    Size(byte) of PMC data which becomes the contents of Message data.

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_NUMBER The parameter number(number) for unsolicited messaging is wrong.
    EW_PARAM The parameter for the unsolicited messaging has not been set.

    unsolic\cnc_rdunsolicprm2

    Reads the parameter for unsolicited messaging from CNC. This function is available only for Series Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    It is necessary to execute cnc_wrunsolicprm2 and make the parameter effective before reading the parameters by this function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdunsolicprm2( unsigned short FlibHndl, short number, IODBUNSOLIC *data );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

    data2 out

    Pointer to IODBUNSOLIC2 structure in which the parameter for the unsolicited messaging will be stored.

    The IODBUNSOLIC structure is as follows.
    typedef struct iodbunsolic2 {
        char                ipaddr[64];
        unsigned long       port;
        unsigned short      retry;
        unsigned short      timeout;
        unsigned short      alivetime;
        char                dummy1[8];
        UNSOLICMSG_TYPE_PRM cntrl;
        unsigned short      transnum;
        char                dummy2[14];
        UNSOLICMSG_TYPE_PRM trans[3];
    } IODBUNSOLIC2;
    
    typedef struct unsolicmsg_type_prm {
        unsigned short      type;
        char                dummy1[2];
        union {
            typedef {
                unsigned short  path;
                short           addr;
                unsigned long   no;
                unsigned long   size;
            } pmc;
            typedef {
                unsigned short  path;
                char            dummy2[2];
                unsigned long   no; 
                unsigned long   num;
            } macro;
        } prm
    } UNSOLICMSG_TYPE_PRM;
    
    ipaddr
    IP address or host name of destination PC.
    ex.) "192.168.0.1"
    port
    TCP/UDP port number of destination PC.
    Range) 5001 - 65535
    retry
    Number of transmission retry to observe communication board transmits data. Set the retry count that is used when there is no answer for the data transmission.
    Range) 1 - 32767
    timeout
    Timeout times(sec)
    Timeout(sec) to observe communication board transmits data. Set the time(sec) of timeout until answering to the data transmission.
    Range) 1 - 32767
    alivetime
    Alive signal time(sec)
    The interval time(sec)of the existence signals which are transmitted while communication board operates. Set the value less than the value of the above "timeout".
    Range) 1 - 32767
    cntrl.prm.type
    Kind of control parameter
    This data is the kind of control parameter for the ladder program or the NC program to demand the message transmission.
    0 : Control parameter is invalid.
    1 : PMC address(Response Notice method)
    2 : PMC address(Simple method)
    3 : Custom macro variable(Simple method)
    4 : Temporary RTM variable(Simple method)(0i-F,30i/31i/32i only)
    cntrl.prm.pmc.path
    PMC unit type for control parameter
    This data is PMC unit type number for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the control parameter is invalid.
    cntrl.prm.pmc.addr
    PMC address for control parameter
    This data is PMC address for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    5 : R (Internal relay)
    12 : E (Extended relay)
    cntrl.prm.pmc.no
    PMC address number for control parameter
    This data is PMC address number for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    Range) (The range depends on an effective PMC area)
    cntrl.prm.pmc.size
    unused
    cntrl.prm.macro.path
    CNC path number for control parameter
    This data is CNC path number for control parameter for the NC program to demand the message transmission.
    When the value of "Kind of control parameter" is "3" and "4", this value is effective.
    Range) 1 - 10(The range depends on an effective PMC area) When this value is 65535, the control parameter is invalid.
    cntrl.prm.macro.no
    Macro variable number for control parameter
    This data is Macro variable number for control parameter for the NC program to demand the message transmission.
    When the value of "Kind of control parameter" is "3" and "4", this value is effective.
    Range) (The range depends on an effective Macro variable)
    cntrl.prm.macro.num
    unused
    transnum
    Transmission number
    Number of transmitted messages.
    Range) 1 - 3
    trans[n].prm.type
    Kind of transmission parameter : range of n (0-2).
    0 : Transmission parameter is invalid.
    1 : PMC address
    3 : Custom macro variable
    4 : Temporary RTM variable
    5 : Permanent RTM variable(0i-F,30i/31i/32i only)
    trans[n].prm.pmc.path
    PMC unit type number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the transmission parameter is invalid.
    trans[n].prm.pmc.addr
    PMC address for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    0 : G (Signal to PMC->CNC)
    1 : F (Signal to CNC->PMC)
    2 : Y (Signal to PMC->machine)
    3 : X (Signal to machine->PMC)
    4 : A (Message demand)
    5 : R (Internal relay)
    6 : T (Changeable timer)
    7 : K (Keep relay)
    8 : C (Counter)
    9 : D (Data table)
    10 : M (Input signal from other devices)(0i-F,30i/31i/32i only)
    11 : N (Output signal to other devices)(0i-F,30i/31i/32i only)
    12 : E (Extended relay)
    13 : Z (System relay)(0i-F,30i/31i/32i only)
    trans[n].prm.pmc.no
    PMC address number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    Range) 1 - 10(The range depends on an effective PMC area)
    trans[n].prm.pmc.size
    PMC data size for transmission parameter (bytes) : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective PMC data area and transmission number.)
    trans[n].prm.macro.path
    CNC path number of transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) 1 - 10 (The range depends on an effective CNC path number) When this value is 65535, the transmission parameter is invalid.
    trans[n].prm.macro.no
    Macro valiable number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective Macro variable data )
    trans[n].prm.macro.num
    Number of macro variable for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective Macro variable data and transmission number.)

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_NUMBER The parameter number(number) for unsolicited messaging is wrong.
    EW_PARAM The parameter for the unsolicited messaging has not been set.

    unsolic\cnc_unsolicstart

    Directs the starting of reception of the unsolicited messaging. The starting of reception directs by the PC that receives the unsolicited messaging.
    This function is available only for Series 16i/18i/21i, 0i, Power Mate i, Series 30i/31i/32i and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_unsolicstart( unsigned short FlibHndl, short number, HWND hWnd, UINT msgno, short chkalive, short *bill );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

    hWnd in

    Specify the window handle which receives the window message.

    msgno in

    Specify the window message number (0-16383). The window message number which is added WM_APP(0x8000) is notified to the application.

    chkalive in

    Specify the interval time(sec) that the unsolicited messaging server checks the existence signal transmitted from the communication board. Set the value longer than "alivetime" which has been set by cnc_wrunsolicprm. When the existence signal from CNC cannot be received during the time of about twice the value of chkalive, the message of wParam=-1 is transmitted to the application. When OFF/ON of the CNC power supply is done during this interval, the information of CNC power OFF(wParam=-1) cannot be notified to the application by the Unsolicited messaging server. So, the operation after that is not guaranteed.

    bill out

    Pointer to the data in which the handle for the Message data reading will be stored. This data will be used later when the Message data is read at cnc_rdunsolicmsg.


    ERRORS

    Code Description
    EW_NUMBER The parameter number(number) for unsolicited message is wrong.
    EW_ATTRIB The window message number(msgno) is wrong.
    EW_DATA The interval time(chkalive) to check the existence signal transmitted from the communication board is wrong.
    EW_PARAM The parameter for the unsolicited message has not been set.
    EW_BUSY The unsolicited message is being transmitted.
    EW_FUNC Unavailable. or Please stop receiving by cnc_unsolicstop. or The unsolicited messaging server has not started.
    EW_BUFFER The number of CNC which is able to be registered in the Unsolicited messaging server is exceeded.
    EW_REJECT The message transmission is begun with other destination PC.
    or The starting of reception was directed excluding PC that receives the unsolicited messaging.

    unsolic\cnc_unsolicstop

    Directs the termination of reception of the unsolicited messaging.
    When the CNC parameter No.905#4 is "1", this function can be executed from other PC in which the CNC unsolicited messaging server is active.
    This function is available only for Series 16i/18i/21i, 0i, Series 30i/31i/32i, Power Mate i and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_unsolicstop( unsigned short FlibHndl, short number );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".


    ERRORS

    Code Description
    EW_NUMBER The parameter number(number) for unsolicited messaging is wrong.
    EW_FUNC Unavailable. or The reception of the unsolicited messaging has not been started by cnc_unsolicstart.

    unsolic\cnc_wrunsolicprm

    Sets the parameter for unsolicited messaging to CNC. This function is available only for Series 16i/18i/21i, 0i and Power Mate i. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    After calling the cnc_unsolicstart function, the parameter set by this function becomes effective.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrunsolicprm( unsigned short FlibHndl, short number, IODBUNSOLIC *data );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

    data in

    Pointer to IODBUNSOLIC structure which sets the parameters for the unsolicited messaging.

    The IODBUNSOLIC structure is as follows.
    typedef struct iodbunsolic {
        char            ipaddr[16] ;
        unsigned short  port ;
        short           reqaddr ;
        short           pmcno ;
        short           retry ;
        short           timeout ;
        short           alivetime;
        short           setno ;
        union {
            struct {
                short   type ;
                short   rdaddr ;
                short   rdno ;
                short   rdsize ;
            } pmc ;
            struct {
                short   type ;
                long    dummy1 ;
                short   dummy2 ;
            } dmy ;
        } rddata[3] ;
    } IODBUNSOLIC ;
    ipaddr
    IP address of destination PC.
    ex.) "192.168.0.1"
    port
    TCP/UDP port number of destination PC.
    The unsolicited messaging function uses TCP and UDP of the same port number.
    If you set the firewall by this port number, you have to open the port for this port number.
    reqaddr
    PMC address type for the data transmission control. Only "R" or "E" address can be used for the transmission control, so set either "5" or "12".
    5 : R (Internal relay)
    12 : E (Extended relay)
    pmcno
    PMC address number for the data transmission control.
    retry
    Number of transmission retry to observe communication board transmits data. Set the retry count that is used when there is no answer for the data transmission.
    timeout
    Timeout(sec) to observe communication board transmits data. Set the time(sec) of timeout until answering to the data transmission.
    alivetime
    The interval time(sec)of the existence signals which are transmitted while communication board operates. Set the value less than the value of the above "timeout".
    setno
    Number of the Message data to be transmitted. (1-3).
    type
    The type of the transmitted data. This is a reserved value, so set to "1".
    rdaddr
    PMC address which becomes the contents of the Message data.
    0 : G (Signal to PMC->CNC)
    1 : F (Signal to CNC->PMC)
    2 : Y (Signal to PMC->machine)
    3 : X (Signal to machine->PMC)
    4 : A (Message demand)
    5 : R (Internal relay)
    6 : T (Changeable timer)
    7 : K (Keep relay)
    8 : C (Counter)
    9 : D (Data table)
    10 : M (Input signal from other devices)
    11 : N (Output signal to other devices)
    12 : E (Extended relay)
    rdno
    Start address number of PMC data which becomes the contents of the Message data.
    rdsize
    Size(byte) of PMC data which becomes the contents of the Message data. According to the number of the Message data to be transmitted(setno), maximum number which can be set to "rdsize" varies as follows.
    in case of setno = 1 : Max.1430 bytes
    in case of setno = 2 : Max.1414 bytes(total)
    in case of setno = 3 : Max.1398 bytes(total)
    Setting example)
    IP address : 192.168.0.1
    Port number : 8196
    PMC address : R2000
    Retry number : 3
    Timeout : 10 sec
    Transmission data : 2
    1st message : R2100-2149
    2nd message : D110-149

    IODBUNSOLIC data;
    strcpy(data.ipaddr,"192.168.0.1"); // IP address
    data.port = 8196; // Port number
    data.reqaddr = 5; // "R"
    data.pmcno = 2000; // 2000
    data.retry = 3; // retry count
    data.timeout = 10; // Timeout time(sec)
    data.alivetime = 5; // Alive signal time(sec)
    data.setno = 2; // Transmission data number
    data.rddata[0].pmc.type = 1; // Type of data("1")
    data.rddata[0].pmc.rdaddr = 5; // "R"
    data.rddata[0].pmc.rdno = 2100; // 2100
    data.rddata[0].pmc.rdsize = 50; // 1st message data size
    data.rddata[1].pmc.type = 1; // Type of data("1")
    data.rddata[1].pmc.rdaddr = 9; // "D"
    data.rddata[1].pmc.rdno = 110; // 110
    data.rddata[1].pmc.rdsize = 40; // 2nd message data size

    ERRORS

    Code Description
    EW_FUNC Unavailable
    EW_NUMBER The parameter number(number) for unsolicited messaging is wrong.
    EW_DATA The content of the parameter for the unsolicited messaging is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure.
    0 : error except EW_DATA
    1 : IP address(ipaddr) of destination PC is wrong.
    2 : Port number(port) of destination PC is wrong.
    3 : PMC address type(reqaddr) for the data transmission control is wrong.
    4 : PMC address number(pmcno) for the data transmission control is wrong.
    5 : Number(retry) of transmission retry to observe communication board transmits data is wrong.
    6 : Timeout time(timeout) to observe communication board transmits data is wrong.
    7 : The interval time(alivetime)of the existence signals which are transmitted while communication board operates is wrong.
    8 : Number(setno) of the Message data to be transmitted is wrong.
    9 : The type(type) of the transmitted data is wrong.
    10 : PMC address(rdaddr) which becomes the contents of the Message data is wrong.
    11 : Start number(rdno) of PMC data which becomes the contents of the Message data is wrong.
    12 : Size(rdsize) of PMC data which becomes the contents of the Message data is wrong.
    EW_BUSY The unsolicited message is being transmitted.
    EW_REJECT The message transmission is being executed with other destination PC.

    unsolic\cnc_wrunsolicprm2

    Sets the parameter for unsolicited messaging to CNC. This function is available only for Series 30i/31i/32i, 0i-D/F and PMi-A. This function cannot be used with Visual Basic. Please use Visual C++ for making your application.
    Please refer to "Unsolicited Messaging Function" for the detail information of unsolicited messaging function.

    After calling the cnc_unsolicstart function, the parameter set by thisfunction becomes effective.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrunsolicprm2( unsigned short FlibHndl, short number, IODBUNSOLIC2 *data2 );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    number in

    The parameter number for unsolicited messaging. Reserved argument, so must be set to "1".

    data in

    Pointer to IODBUNSOLIC2 structure which sets the parameters for the unsolicited messaging. The IODBUNSOLIC structure is as follows.

    typedef struct iodbunsolic2 {
        char                ipaddr[64];
        unsigned long       port;
        unsigned short      retry;
        unsigned short      timeout;
        unsigned short      alivetime;
        char                dummy1[8];
        UNSOLICMSG_TYPE_PRM cntrl;
        unsigned short      transnum;
        char                dummy2[14];
        UNSOLICMSG_TYPE_PRM trans[3];
    } IODBUNSOLIC2;
    
    typedef struct unsolicmsg_type_prm {
        unsigned short      type;
        char                dummy1[2];
        union {
            typedef {
                unsigned short  path;
                short           addr;
                unsigned long   no;
                unsigned long   size;
            } pmc;
            typedef {
                unsigned short  path;
                char            dummy2[2];
                unsigned long   no; 
                unsigned long   num;
            } macro;
        } prm
    } UNSOLICMSG_TYPE_PRM;
    
    ipaddr
    IP address or host name of destination PC.
    ex.) "192.168.0.1"
    port
    TCP/UDP port number of destination PC.
    The unsolicited messaging function uses TCP and UDP of the same port number.
    If you set the firewall by this port number, you have to open the port for this port number.
    Range) 5001 - 65535
    retry
    Retry count
    Number of transmission retry to observe communication board transmits data. Set the retry count that is used when there is no answer for the data transmission.
    Range) 1 - 32767
    timeout
    Timeout times(sec)
    Timeout(sec) to observe communication board transmits data. Set the time(sec) of timeout until answering to the data transmission.
    Range) 1 - 32767
    alivetime
    Alive signal time(sec)
    The interval time(sec)of the existence signals which are transmitted while communication board operates. Set the value less than the value of the above "timeout".
    Range) 1 - 32767
    cntrl.type
    Kind of control parameter
    This data is the kind of control parameter for the ladder program or the NC program to demand the message transmission.
    0 : Control parameter is invalid.
    1 : PMC address(Response Notice method)
    2 : PMC address(Simple method)
    3 : Custom macro variable(Simple method)
    4 : Temporary RTM variable(Simple method)(0i-F,30i/31i/32i only)
    cntrl.prm.pmc.path
    PMC unit type for control parameter
    This data is PMC unit type number for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the control parameter is invalid.
    cntrl.prm.pmc.addr
    PMC address for control parameter
    This data is PMC address for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    5 : R (Internal relay)
    12 : E (Extended relay)
    cntrl.prm.pmc.no
    PMC address number for control parameter
    This data is PMC address number for control parameter for the ladder program to demand the message transmission.
    When the value of "Kind of control parameter" is "1" and "2", this value is effective.
    Range) (The range depends on an effective PMC area)
    cntrl.prm.pmc.size
    unused
    cntrl.prm.macro.path
    CNC path number for control parameter
    This data is CNC path number for control parameter for the NC program to demand the message transmission.
    When the value of "Kind of control parameter" is "3" and "4", this value is effective.
    Range) 1 - 10(The range depends on an effective PMC area) When this value is 65535, the control parameter is invalid.
    cntrl.prm.macro.no
    Macro variable number for control parameter
    This data is Macro variable number for control parameter for the NC program to demand the message transmission.
    When the value of "Kind of control parameter" is "3" and "4", this value is effective.
    Range) (The range depends on an effective Macro variable)
    cntrl.prm.macro.num
    unused
    transnum
    Transmission number
    Number of transmitted messages.
    Range) 1 - 3
    trans[n].type
    Kind of transmission parameter : range of n (0-2).
    0 : Transmission parameter is invalid.
    1 : PMC address
    3 : Custom macro variable
    4 : Temporary RTM variable
    5 : Permanent RTM variable(0i-F,30i/31i/32i only)
    trans[n].prm.pmc.path
    PMC unit type number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    Range) 1 - 3 (The range depends on an effective PMC unit type number.) When this value is 65535, the transmission parameter is invalid.
    trans[n].prm.pmc.addr
    PMC address for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    0 : G (Signal to PMC->CNC)
    1 : F (Signal to CNC->PMC)
    2 : Y (Signal to PMC->machine)
    3 : X (Signal to machine->PMC)
    4 : A (Message demand)
    5 : R (Internal relay)
    6 : T (Changeable timer)
    7 : K (Keep relay)
    8 : C (Counter)
    9 : D (Data table)
    10 : M (Input signal from other devices)(0i-F,30i/31i/32i only)
    11 : N (Output signal to other devices)(0i-F,30i/31i/32i only)
    12 : E (Extended relay)
    13 : Z (System relay)(0i-F,30i/31i/32i only)
    trans[n].prm.pmc.no
    PMC address number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "1", this value is effective.
    Range) 1 - 10(The range depends on an effective PMC area)
    trans[n].prm.pmc.size
    PMC data size for transmission parameter (bytes) : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective PMC data area and transmission number.)
    In case of transmission number is "1" : Max.2890 bytes
    In case of transmission number is "2" : Max.2874 bytes(total)
    In case of transmission number is "3" : Max.2858 bytes(total)
    When the macro variable is used to the transmission parameter, the size of one macro variable is eight bytes.
    trans[n].prm.macro.path
    CNC path number of transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) 1 - 10 (The range depends on an effective CNC path number) When this value is 65535, the transmission parameter is invalid.
    trans[n].prm.macro.no
    Macro variable number for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    Range) (The range depends on an effective Macro variable data )
    trans[n].prm.macro.num
    Number of macro variable for transmission parameter : range of n (0-2).
    When the value of "Kind of transmission parameter" is "3", "4" and "5", this value is effective.
    In case of transmission number is "1" : Max.2890 bytes
    In case of transmission number is "2" : Max.2874 bytes(total)
    In case of transmission number is "3" : Max.2858 bytes(total)
    When the macro variable is used to the transmission parameter, the size of one macro variable is eight bytes.
    When "Kind of transmission parameter" is "3" and "Macro variable number" is 1000 or more(system variavles), this parameter can set only "1".
    Setting example)
    IP address : 192.168.0.1
    Port number : 8196
    Control method : Simple method
    Control parameter : PMC address"1:R2000"
    Retry count : 3
    Timeout time : 10
    Transmission number : 3
    Transmission parameter[0] : PMC data area"1:R2100-1:R2149"
    Transmission parameter[1] : Custom macro"1:3011"
    Transmission parameter[2] : Temporary RTM variable"1:0-1:4"

    IODBUNSOLIC2 data2;
    strcpy(data2.ipaddr,"192.168.0.1"); // IP address
    data2.port = 8196; // Port number
    data2.retry = 3; // Retry count
    data2.timeout = 10; // Timeout time(sec)
    data2.alivetime = 5; // Alive signal time(sec)
    // Control parameter
    data2.cntrl.type = 2; // - Kind(simple method)
    data2.cntrl.prm.pmc.path = 1; // - PMC unit type
    data2.cntrl.prm.pmc.addr = 1; // - PMC address
    data2.cntrl.prm.pmc.no = 1; // - PMC address number
    data2.transnum = 3; // Transmission number
    // Transmission parameter[0]
    data2.trans[0].type = 1; // - Kind
    data2.trans[0].prm.pmc.path = 1; // - PMC unit type
    data2.trans[0].prm.pmc.addr = 5; // - PMC address
    data2.trans[0].prm.pmc.no = 2100; // - PMC address number
    data2.trans[0].prm.pmc.size = 50; // - PMC data size
    // Transmission parameter[1]
    data2.trans[1].type = 3; // - Kind
    data2.trans[1].prm.macro.path = 1; // - CNC path number
    data2.trans[1].prm.macro.no = 3011; // - Custon macro variable
    data2.trans[1].prm.macro.num = 1; // - Number of macro variable
    // Transmission parameter[2]
    data2.trans[2].type = 4; // - Kind
    data2.trans[2].prm.macro.path = 1; // - CNC path number
    data2.trans[2].prm.macro.no = 0; // - Temporary RTM variable
    data2.trans[2].prm.macro.num = 5; // - Number of macro variable

    ERRORS

    Code Description
    EW_BUSY The unsolicited message is being transmitted.
    The state of the unsolicited messaging function is not "Stop"
    EW_FUNC Unavailable
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    Member of ODBERR : err_no
    5 : Data was rejected.
    Member of ODBERR : err_dtno
    2 : The mode of the unsolicited messaging function is not "PC mode".
    3 : The status of the unsolicited messaging function is not "Stop"
    4 : Trouble of communication board
    EW_NUMBER The parameter number(number) for unsolicited messaging is wrong.
    EW_DATA The contents of parameter for unsolicited messaging function is wrong.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no and err_dtno of OBDERR structure.
    Member of ODBERR : err_no
    2 : Out of range
    3 : Format error
    Member of ODBERR : errdt_no
    11 : IP address(ipaddr) or host name of destination PC is wrong.
    12 : Port number(port) of destination PC is wrong.
    13 : Retry number(retry) is wrong.
    14 : Timeout time(timeouit) is wrong.
    15 : Alive signal time(alive) is wrong.
    16 : Control parameter(cntrl.prm.type) is wrong.
    17 : PMC unit type for control parameter(cntrl.prm.pmc.path) is wrong.
    18 : PMC address for control parameter(cntrl.prm.pmc.addr) is wrong.
    19 : PMC address number for control parameter(cntrl.prm.pmc.no) is wrong.
    20 : (unused)
    21 : CNC path number for control parameter(cntrl.prm.macro.path) is wrong.
    22 : Macro variable number for control parameter(cntrl.prm.macro.no)is wrong.
    23 : (unused)
    24 : Transmission number(transnum) is wrong.
    30+(i*10) : Kind of transmission parameter(trans[n].prm.type) is wrong. (Same i=0,1,2)
    31+(i*10) : PMC unit type number for transmission parameter(trans[n].prm.pmc.path) is wrong.
    32+(i*10) : PMC address for transmission parameter(trans[n].prm.pmc.addr) is wrong.
    33+(i*10) : PMC address number for transmission parameter(trans[n].prm.pmc.no) is wrong.
    34+(i*10) : PMC data size for transmission parameter(trans[n].prm.pmc.size) is wrong.
    35+(i*10) : CNC path number of transmission parameter(trans[n].prm.macro.path) is wrong.
    36+(i*10) : Macro variable number for transmission parameter(trans[n].prm.macro.no) is wrong.
    37+(i*10) : Number of macro variable for transmission parameter(trans[n].prm.macro.num) is wrong.
    EW_PROT Write protect
    Parameter writing is failed.
    In order to get more information for this err_no return value, execute cnc_getdtailerr function. The following details status will be set onto the member, err_no of OBDERR structure.
    Member of ODBERR : err_no
    11 : Writing to File SRAM was failed.
    EW_REJECT The message transmission is being executed with other destination PC.

    wave\cnc_rdwavedata

    Reads waveform diagnosis data.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.

    In case that the waveform diagnosis parameter is changed, the correct data cannot be read if cnc_wavestart function is not executed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdwavedata(unsigned short FlibHndl, short channel, short axis, long rd_pntr, long *number, ODBWVDT *wvdt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    channel in

    Specify the channel number to be read.

    Series 15 : 0,..,3, 6,..,11
    Series 15i : 0,..,3, 8,..,11
    Series 16/18, 16i/18i/21i, 0i : 0,..,7
    Series 16i/18i-W : 6, 7
    axis in

    Specify axis number of data to be read.(1 to number of controlled axis)
    This is invalid except channel number 0 to 5.
    In case of Series 16/18, 16i/18i/21i, 0i, and Series 15/15i, 16i/18i-W, this is not used.

    rd_pntr in

    Specify the start pointer to read.

    example)
    In case of the top, '0' should be specified.
    In case of the 10th from the top, '9' should be specified.
    number in/out

    Specify the address of the variable which shows the number of data of the waveform diagnosis data.
    Set the read number of data to this variable(*number).
    After executing this function, the number of data which has been read actually is set.

    The maximum data number which can be sampled is shown in the following table according to the condition and the CNC MODEL.

    MODEL Series 16/18, 16i/18i/21i, 0i Series 15 Series 15i
    condition 0/1/2 100/101/102 0/1/2 100/101/102
    maximum number(n) 4096 8192 prm.15#6=
    0:1000
    1:5000
    2000 5001
    wvdt out

    Pointer to the ODBWVDT structure including the waveform diagnosis data.
    The ODBWVDT structure is as follows.

    typedef struct odbwvdt {
        short   channel ;   /* channel number */
        short   kind ;      /* kind of waveform data */
        union {
            short   axis ;  /* axis number of waveform data */
            struct {        /* machine signal */
                char    adr ; /* kind of PMC address */
                char    bit ; /* bit number */
                short   no ;  /* PMC address number */
            } io ;
        } u ;
        char    year ;              /* year (0<->99) */
        char    month ;             /* month (1<->12) */
        char    day ;               /* day (1<->31) */
        char    hour ;              /* hour (0<->23) */
        char    minute ;            /* minute (0<->59) */
        char    second ;            /* second (0<->59) */
        short   t_cycle ;           /* sampling cycle (msec) */
        short   data[8192] ;        /* waveform diagnosis data */
    } ODBWVDT ;
    
    channel
    channel number
    The channel number which has been read actually is set.

    kind
    kind of waveform data
    Refer to the kind of waveform data in cnc_rdwaveprm function.
    • In case that "kind" is except 13(machine signal)
    • axis
      axis number of waveform data( Series 15/15i )
      axis number of waveform data
      0,..,7 1 to number of controlled axis : axis number
      9 1 to number of path : path number
      10,..,11 1 to number of spindle : spindle number
      axis number of waveform data( Series 16/18, 16i/18i/21i, 0i )
      channel number kind of waveform data
      0,..,5 1,..,number of controlled axis : axis number
      6, 7 0,..,3, 5,..,7 1,..number of controlled axis : axis number
      6, 7 10, 11 1,..number of spindle : spindle number

    • In case that "kind" is 13(machine signal)
    • adr
      kind of PMC address of machine signal
      The kind of the PMC address which is traced is stored with ASCII code.
      kind of PMC address to be set : G, F, Y, X
      bit
      bit number of machine signal
      The bit number of PMC address which is traced is stored.
      range of bit number which is stored : 0,..,7
      no
      number of PMC address of machine signal
      The PMC address number which is traced is stored.
      The range of stored number is shown in pmc_rdpmcrng

    year, month, day, hour, minute, second
    If condition is 0,..,20, these are the date when sampling is started.
    If condition is 100,..,120, these are the date when sampling is stopped.
    year Year (0,..,99)
    month Month (1,..,12)
    day Day (1,..,31)
    hour Hour (0,..,23)
    minute Minute (0,..,59)
    second Second (0,..,59)

    t_cycle
    sampling cycle (msec)
    MODE Series 16/18, 16i/18i/21i, 0i Series 15 Series 15i
    condition 0/1/2 100/101/102 0/1/2 100/101/102 kind is except 13 kind is 13
    cycle 2 8 2/4/8/16 8 2/4/8/16 8/16

    data
    waveform diagnosis data
    The data which is specified by "kind" is stored.(In case of kind=13, this is 0/1. Othewise, this is binary data)
    Concerning the unit, etc., refer to the kind of the waveform data in cnc_rdwaveprm function.

    Summary of the reading data

    • In case that "kind" is except 13(machine signal)
    • structure membar size kind effecitve range(binary)
      channel 2 channel number 0,..,
      kind 2 kind of waveform data 0,..,12
      axis 2 axis number of waveform data 1,..,number of controlled axis
      (dummy) 2
      year 1 year 0,..,99
      month 1 manth 1,..,12
      day 1 day 1,..,31
      hour 1 hour 0,..,23
      minute 1 minute 0,..,59
      second 1 second 0,..,59
      t_cycle 2 sampling cycle 2/4/8/16(ms)
      data[0] 2 waveform diagnosis data
      data[1] 2 waveform diagnosis data
        :   :   :
      data[n-1] 2 waveform diagnosis data
    • In case that "kind" is 13(machine signal)
    • structure member size kind effecitve range(binary)
      channel 2 channel number 6,..,
      kind 2 kind of waveform data 13
      adr 1 kind of PMC address of machine signal ASCII code(G,F,Y,X)
      bit 1 bit number of machine signal 0,..,7
      no 2 PMC address number 0,..,
      year 1 year 0,..,99
      month 1 manth 1,..,12
      day 1 day 1,..,31
      hour 1 hour 0,..,23
      minute 1 minute 0,..,59
      second 1 second 0,..,59
      t_cycle 2 sampling cycle 2/4/8/16(ms)
      data[0] 2 waveform diagnosis data 0 or 1
      data[1] 2 waveform diagnosis data 0 or 1
        :   :   :   :
      data[n-1] 2 waveform diagnosis data 0 or 1


    ERRORS

    Code Description
    EW_FUNC function is not executed
    cnc_wavestop function has not been executed.
    EW_LENGTH data block length error
    The number of data(*number) is less than 1.
    EW_NUMBER data number error
    Channel number(channel) is out of range.
    EW_ATTRIB data attribute error
    Axis number(axis) is out of range.
    EW_DATA data error
    Start pointer to read(rd_pntr) is out of range.
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error( Series 16/18, 16i/18i/21i, 0i )
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.
    EW_BUFFER buffer empty
    There is no specified waveform diagnosis data.
    (The case that the condition of a waveform diagnosis does not correspond to the specified channel number is included.)

    wave\cnc_rdwaveprm

    Reads the waveform diagnosis parameter setting.

    Cnc_rdwaveprm2 supports Series 15i and expanded the function.
    Please use cnc_rdwaveprm2 better than cnc_rdwaveprm.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdwaveprm(unsigned short FlibHndl, IODBWAVE *wave);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    wave out

    Pointer to the IODBWAVE structure including the waveform diagnosis parameter.
    The IODBWAVE structure is as follows.

    typedef struct iodbwave {
        short   condition ; /* condition */
        char    trg_adr ;   /* trigger address */
        char    trg_bit ;   /* trigger bit */
        short   trg_no ;    /* trigger number */
        short   delay ;     /* delay time */
        short   t_range ;   /* sampling time */
        struct {
            short   kind ;  /* kind of waveform data */
            union {
    #ifdef M_AXIS2  /* Series 15 : maximum axis=24 */
                long        axis ;  /* axis information */
    #else
                short       axis ;  /* axis information */
    #endif
                struct {            /* machine signal */
                    char    adr ;   /*   kind of PMC address */
                    char    bit ;   /*   bit number */
                    short   no ;    /*   number of PMC address */
                } io ;
            } u ;
        } ch[12] ;
    } IODBWAVE ;
    
    condition
    data sampling condition
    One of the following condition is stored.
    0 The sampling of the data is started by cnc_wavestart function, and stopped after the specified sampling time.
    1 The sampling of the data is started when the trigger specified by the next item rises after calling cnc_wavestart function, and stopped after the specified sampling time.
    2 The sampling of the data is started when the trigger specified by the next item falls after calling cnc_wavestart function, and stopped after the specified sampling time.
    100 The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs.
    101 The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger rises.
    102 The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger falls.
    * In case of Series 16/18, 16i/18i/21i, 0i the waveform data under the condition 100,101,102 is backupped even if the power is off.
    * In case of Series 16i/18i-W, there is not the setting for condition 100,101,102.
    trg_adr
    trigger address
    The kind of PMC address which corresponds to machine signal for a trigger is stored with ASCII code.
    It is valid when condition is 1/2/101/102.
    Kind of stored PMC address : "G","F","Y","X"
    trg_bit
    trigger bit
    The bit number of PMC address which corresponds to machine signal for a trigger is stored.
    It is valid when condition is 1/2/101/102.
    Range of stored bit number : 0,..,7
    trg_no
    trigger number
    The PMC address number which corresponds to machine signal for a trigger is stored.
    It is valid when condition is 1/2/101/102.
    Range of stored number is shown in pmc_rdpmcrng function reference.
    delay
    delay time
    After the stop condition is satisfied and this delay time has passed, the sampling is stopped.
    range
    Series 15 0,..,32000
    Series 16/18, 16i/18i/21i, 0i 0,..,32760
    unit 1 msec
    It is valid when the condition is 100/101/102.
    t_range
    sampling time
    sampling time is stored.
    range
      Series 15
      25/50/100/200/400/800 show the following time respectively.
      500/1000/2000/4000/8000/16000
      Series 16/18, 16i/18i/21i, 0i
      10,..,8192
    unit 1 msec
    It is valid when the condition is 0/1/2.
    ch[n].kind
    (n is channel number 0,..,11)
    An available channel and the kind of the waveform data are as follows according to the CNC MODEL and the condition.
    condition : 100/101/102
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i/21i, 0i Series 15
    0 0 0,..,2, 4,..,7
    1 1 0,..,2, 4,..,7
    2 2 0,..,2, 4,..,7
    3 5 0,..,2, 4,..,7
    4 6 not used
    5 7 not used
    condition : 0/1/2
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i/21i, 0i Series 15
    6 0,..,3, 5,..,7, 9,..,13 0,..,2, 4,..,7, 9,..,11
    7 0,..,3, 5,..,7, 9,..,13 0,..,2, 4,..,7, 9,..,11
    8 not used 13
    9 not used 13
    10 not used 13
    11 not used 13
    * If "-1" is stored in ch[n].kind, the data of its channel is invalid. (The value of "kind" concerning an unused channel is indefinite.)
    * Select a following member of union properly according to the value of ch[n].kind.
    ch[n].u.axis kind : except '13'
    ch[n].u.io kind : '13'
    * In case of Series 16i/18i-W, 10-12 does not exist as the value of ch[n].kind.

    Kind of waveform data (O:available,X:not available)
    number meaning unit Series 16/18,16i/18i/21i,0i Series 15
    0/1/2 100/101/102 0/1/2 100/101/102
    -1 No data - O O O O
    0 Servo error(8msec) Pulse(detection unit) O O O O
    1 Number of servo pulses to be generated Pulse(detection unit) O O O O
    2 Servo torque %(max. current ratio) O O O O
    3 Servo error(2msec) Pulse(detection unit) O X X X
    4 Number of servo pulses after acceleration,deceleration Pulse(detection unit) X X O O
    5 Actual speed RPM O O X X
    Pulse(detection unit) X X O O
    6 Value of the electric current command for servo %(max. current ratio) O O O O
    7 Data during heat simulation %(OVC alarm ratio) O O O O
    9 Composite speed for for 1st,2nd,3rd axis Pulse(detection unit) O X X X
    Composite speed for all axes MM/MIN or RPM X X O X
    10 Spindle speed %(max. spin ratio) O X X X
    rpm X X O X
    11 Load meter for spindle %(max. output ratio) O X O X
    12 Difference of spindle conversion error Pulse(detection unit) O X X X
    13 on/off state of specified machine signal - O X O X
    ch[n].u.axis
    axis information of waveform data
    Axis information of waveform data is stored.
    It is valid when the kind of waveform data is expect '13'.

    Axis information of Series 15, 16/18, 16i/18i/21i, 0i are as follows.

    Series 15
    Each bit according to the kind of waveform data is as follows.
    • Maximum axis <= 15
    • kind of waveform data
      0,..,7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 14 ON : 15th axis designation
      bit 15 : not used
      9
      bit 0 ON : first path designation
      bit 1 ON : second path designation(only 15TT)
      bit 2,..,15 : not used
      10,..,11
      bit 0 ON : first spindle designation
      bit 1 ON : second spindle designation
      bit 2,..,15 : not used
    • Maximum axis = 24
    • kind of waveform data
      0,..,7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 22 ON : 23rd axis designation
      bit 23 ON : bit23 ON : 24th axis designation
      bit 24,..,31 : not used
      9
      bit 0 ON : first path designation
      bit 1 ON : second path designation(only 15TT)
      bit 2,..,31 : not used
      10,..,11
      bit 0 ON : first spindle designation
      bit 1 ON : second spindle designation
      bit 2,..,31 : not used
    Series 16/18, 16i/18i/21i, 0i
    Each bit according to channel number is as follows.
    • channel 0,..,5
    • kind of waveform data
      0,..,3, 5,..,7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 7 ON : eighth axis designation
      bit 8,..,15 : not used
    • channel 6, 7
    • The kind of waveform data
      0,..,3, 5,..,7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 7 ON : eighth axis designation
      bit 8,..,15 : not used
      10,..,11
      bit 0 ON : first spindle designation
      bit 1 ON : second spindle designation
      bit 2 ON : third spindle designation
      bit 3 ON : 4th spindle designation
      bit 4,..,15 : not used
    ch[n].u.io.adr
    Kind of PMC address of machine signal
    The kind of PMC address which corresponds to machine signal to trace is stored with ASCII code.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Kind of stored PMC address : "G","F","Y","X"
    ch[n].u.io.bit
    bit number of machine signal
    The bit number of PMC address which corresponds to machine signal to trace is stored.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Range of stored bit number : 0,..,7
    ch[n].u.io.no
    number of PMC address of machine signal
    The PMC address number which corresponds to machine signal to trace is stored.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    ERRORS

    Code Description
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM(Series16/18, 16i/18i/21i, 0i) CNC parameter error
    3112#0=0 when CNC is turned on. Set 3112#0=1 and reboot.

    wave\cnc_rdwaveprm2

    Reads the waveform diagnosis parameter setting.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdwaveprm2(unsigned short FlibHndl, IODBWVPRM *wave);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    wave out

    Pointer to the IODBWVPRM structure including the waveform diagnosis parameter.
    The IODBWVPRM structure is as follows.

    typedef struct iodbwvprm {
        short   condition ; /* condition */
        char    trg_adr ;   /* trigger address */
        char    trg_bit ;   /* trigger bit */
        short   trg_no ;    /* trigger number */
        short   reserve1 ;
        long    delay ;     /* delay time */
        long    t_range ;   /* sampling time */
        struct {
            short   kind ;  /* kind of waveform data */
            union {
                long        axis ;  /* axis information */
                struct {            /* machine signal */
                    char    adr ;   /* kind of PMC address */
                    char    bit ;   /* bit number */
                    short   no ;    /* number of PMC address */
                } io ;
            } u ;
            long    reserve2 ;
        } ch[12] ;
    } IODBWVPRM ;
    
    condition
    data sampling condition
    One of the following condition is stored.
    0 : The sampling of the data is started by cnc_wavestart function, and stopped after the specified sampling time.
    1 to 20 : The sampling of the data is started when the trigger event occurs after calling cnc_wavestart function, and stopped after the specified sampling time.
    The trigger events are the followings.
    1 : Machine signal on
    2 : Machine signal off
    3 : Change of the machine signal state (only Series 15i)
    10 : Servo alarm (only Series 15i)
    11 : Servo alarm or machine signal on (only Series 15i)
    12 : Servo alarm or machine signal off (only Series 15i)
    13 : Servo alarm or change of the machine signal state (only Series 15i)
    20 : The trigger event is not specified. (only Series 15i)
    100 to 120 : The sampling of the data is started by cnc_wavestart function, and stopped when the trigger event occurs.
    The trigger events are the followings.
    100 : Servo alarm
    101 : Servo alarm or machine signal on
    102 : Servo alarm or machine signal off
    103 : Servo alarm or change of the machine signal state (only Series 15i)
    111 : Machine signal on (only Series 15i)
    112 : Machine signal off (only Series 15i)
    113 : Change of the machine signal state (only Series 15i)
    120 : The trigger event is not specified. (only Series 15i)
    * In case of Series 16/18, 0i, the waveform data under the condition 100,101,102 is backupped even if the power is off.

    trg_adr
    kind of PMC address of trigger machine signal
    The kind of PMC address which corresponds to machine signal for a trigger event is stored with ASCII code.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Kind of stored PMC address : "G","F","Y","X"
    When the machine signal for a trigger event is not be specified, NULL(0x00) is stored.

    trg_bit
    bit number of trigger machine signal
    The bit number of PMC address which corresponds to machine signal for a trigger event is stored.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Range of stored bit number : 0,..,7

    trg_no
    number of PMC address of trigger machine signal
    The PMC address number which corresponds to machine signal for a trigger event is stored.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    delay
    delay time
    After the stop condition is satisfied and this delay time has passed, the sampling is stopped.
    range
    Series 15 0,..,32000
    Series 15i 0,..,160000
    Series 16/18, 16i/18i, 0i 0,..,32760
    unit 1 msec
    It is valid when the condition is 100/101/102/103/111/112/113.

    t_range
    sampling time
    Sampling time is stored.
    range
    Series 15 25/50/100/200/400/800 show the following time respectively.
    500/1000/2000/4000/8000/16000
    Series 15i 10,..,80000
    Series 16/18, 16i/18i, 0i 10,..,8192
    unit 1 msec
    It is valid on all conditions.

    ch[n].kind
    kind of waveform data (n is channel number 0,..,11)
    An available channel and the kind of the waveform data are as follows according to the CNC MODEL and the condition.
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i, 0i Series 15 Series 15i
    0 0 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 1)
    1 1 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 2)
    2 2 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 3)
    3 5 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 4)
    4 6 (condition is 100/101/102) not used not used
    5 7 (condition is 100/101/102) not used not used
    6 0,..,3, 5,..,7, 9,..,13 (condition is 0/1/2) 0,..,2, 4,..,7, 9,..,11 (condition is 0/1/2) not used
    7 0,..,3, 5,..,7, 9,..,13 (condition is 0/1/2) 0,..,2, 4,..,7, 9,..,11 (condition is 0/1/2) not used
    8 not used 13 (condition is 0/1/2) 13 (signel 1)
    9 not used 13 (condition is 0/1/2) 13 (signel 2)
    10 not used 13 (condition is 0/1/2) 13 (signel 3)
    11 not used 13 (condition is 0/1/2) 13 (signel 4)
    * If "-1" is stored in ch[n].kind, the data of its channel is invalid.
    (The value of "kind" concerning an unused channel is indefinite.)
    * Select a following member of union properly according to the value of ch[n].kind.
    ch[n].u.axis kind : except '13'
    ch[n].u.io kind : '13'

    Kind of waveform data (O:available,X:not available)
    number meaning unit Series 16/18, 16i/18i, 0i Series 15 Series 15i
    0/1/2 100/101/102 0/1/2 100/101/102
    -1 No data - O O O O O
    0 Servo error(8msec) Pulse(detection unit) O O O O O
    1 Number of servo pulses to be generated Pulse(detection unit) O O O O O
    2 Servo torque %(max. current ratio) O O O O O
    3 Servo error(2msec) Pulse(detection unit) O X X X X
    4 Number of servo pulses after acceleration,deceleration Pulse(detection unit) X X O O O
    5 Actual speed RPM O O X X X
    Pulse(detection unit) X X O O O
    6 Value of the electric current command for servo %(max. current ratio) O O O O O
    7 Data during heat simulation %(OVC alarm ratio) O O O O O
    9 Composite speed for 1st,2nd,3rd axis Pulse(detection unit) O X X X X
    Composite speed for all axes MM/MIN,INCH/MIN or RPM X X O X O
    10 Spindle speed %(max. spin ratio) O X X X X
    RPM X X O X O
    11 Load meter for spindle %(max. output ratio) O X O X O
    12 Difference of spindle conversion error Pulse(detection unit) O X X X X
    13 on/off state of specified machine signal - O X O X O

    ch[n].u.axis
    axis information of waveform data
    Axis information of waveform data is stored.
    It is valid when the kind of waveform data is expect '13'.
    Axis information of Series 15/16/18, Series 15i/16i/18i, 0i, are as follows.
  • Series 15
  • kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,2
    4,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 22 ON : 23rd axis designation
    bit 23 ON : 24th axis designation
    bit 24,..,31 : not used
    9
    bit 0 ON : first path designation
    bit 1 ON : second path designation(only 15TT)
    bit 2,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2,..,31 : not used

  • Series 15i
  • kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,2
    4,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 22 ON : 23rd axis designation
    bit 23 ON : 24th axis designation
    bit 24,..,31 : not used
    9
    bit 0 ON : first path designation
    bit 1 ON : second path designation
    (only existing second path)
    bit 2,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2 ON : third spindle designation
    bit 3 ON : fourth spindle designation
    bit 4,..,31 : not used

  • Series 16/18, 16i/18i, 0i
  • channel The kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,5 -
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 7 ON : eighth axis designation
    bit 8,..,31 : not used
    6, 7 0,..,3
    5,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 7 ON : eighth axis designation
    bit 8,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2 ON : third spindle designation
    bit 3,..,31 : not used

    * n = maximum controlled axes

    ch[n].u.io.adr
    Kind of PMC address of machine signal
    The kind of PMC address which corresponds to machine signal to trace is stored with ASCII code.
    It is valid when the kind of waveform data is 13.
    Kind of stored PMC address : "G","F","Y","X"

    ch[n].u.io.bit
    bit number of machine signal
    The bit number of PMC address which corresponds to machine signal to trace is stored.
    It is valid when the kind of waveform data is 13.
    Range of stored bit number : 0,..,7

    ch[n].u.io.no
    number of PMC address of machine signal
    The PMC address number which corresponds to machine signal to trace is stored.
    It is valid when the kind of waveform data is 13.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 16/18, 16i/18i/21i, 0i)
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.

    wave\cnc_wavestart

    Starts a sampling of the waveform diagnosis data.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wavestart(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error( Series 16/18, 16i/18i/21i, 0i )
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.
    EW_REJECT CNC execution rejected( Series 16i/18i/21i, 0i )
    The waveform diagnosis parameter is not set correctly.

    wave\cnc_wavestat

    Reads the sampling status of the waveform diagnosis data.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wavestat(unsigned short FlibHndl, short *stat);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    stat in

    Specify the address of the variable to store the sampling status of waveform diagnosis data.

    0 : sampling completed
    1 : during sampling

    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error( Series 16/18, 16i/18i/21i, 0i )
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.

    wave\cnc_wavestop

    Stops a sampling of the waveform diagnosis data.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wavestop(unsigned short FlibHndl);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.


    ERRORS

    Code Description
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error( Series 16/18, 16i/18i/21i, 0i )
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.

    wave\cnc_wrwaveprm

    Writes the waveform diagnosis parameter.

    cnc_wrwaveprm2 supports Series 15i and is expanded the function.
    Please use cnc_wrwaveprm2 better than cnc_wrwaveprm.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrwaveprm(unsigned short FlibHndl, IODBWAVE *wave);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    wave in

    Pointer to the IODBWAVE structure including the waveform diagnosis parameter.
    The IODBWAVE structure is as follows.

    typedef struct iodbwave {
        short   condition ; /* condition */
        char    trg_adr ;   /* trigger address */
        char    trg_bit ;   /* trigger bit */
        short   trg_no ;    /* trigger number */
        short   delay ;     /* delay time */
        short   t_range ;   /* sampling time */
        struct {
            short   kind ;  /* kind of waveform data */
            union {
    #ifdef M_AXIS2  /* Series 15 : maximum axis=24 */
                long        axis ;  /* axis information */
    #else
                short       axis ;  /* axis information */
    #endif
                struct {            /* machine signal */
                    char    adr ;   /*   kind of PMC address */
                    char    bit ;   /*   bit number */
                    short   no ;    /*   number of PMC address */
                } io ;
            } u ;
        } ch[12] ;
    } IODBWAVE ;
    
    condition
    condition
    One of the following condition should be specified.
    0 : The sampling of the data is started by cnc_wavestart function, and stopped after the specified sampling time.
    1 : The sampling of the data is started when the trigger specified by the next item rises after calling cnc_wavestart function, and stopped after the specified sampling time.
    2 : The sampling of the data is started when the trigger specified by the next item falls after calling cnc_wavestart function, and stopped after the specified sampling time.
    100 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs.
    101 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger rises.
    102 : The sampling of the data is started by cnc_wavestart function, and stopped when a servo alarm occurrs or the trigger falls.
    * In case of Series 16/18, 16i/18i/21i, 0i, the waveform data under the condition 100,101,102 is backupped even if the power is off.
    * In case of Series 16i/18i-W, there is not the setting for condition 100,101,102.

    trg_adr
    trigger address
    Specify the kind of PMC address which corresponds to machine signal for a trigger with ASCII code.
    It is valid when condition is 1/2/101/102.
    Kind of stored PMC address : "G","F","Y","X"
    NULL(0x00) invalidates the setting.

    trg_bit
    trigger bit
    Specify the bit number of PMC address which corresponds to machine signal for a trigger.
    It is valid when condition is 1/2/101/102.
    Range of stored bit number : 0 - 7

    trg_no
    trigger number
    Specify the PMC address number which corresponds to machine signal for a trigger.
    It is valid when condition is 1/2/101/102.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    delay
    delay time
    After the stop condition is satisfied and this delay time has passed, the sampling is stopped.
    range
    Series 15 0 - 32000
    Series 16/18, 16i/18i/21i, 0i 0 - 32760
    unit 1 msec
    It is valid when the condition is 100/101/102.

    t_range
    sampling time
    sampling time is stored.
    range
    Series 15 25/50/100/200/400/800 show the following time respectively.
    500/1000/2000/4000/8000/16000
    Series 16/18, 16i/18i/21i, 0i 10 - 8192
    unit 1 msec
    It is valid when the condition is 0/1/2.

    ch[n].kind
    kind of waveform data( n is channel number 0 - 11)
    Specify the number in the table of "Kind of waveform data" on the next page.

    An available channel and the kind of the waveform data are as follows according to the CNC MODEL and the condition.
    condition : 100/101/102
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i/21i, 0i Series 15
    0 0 0 - 2, 4 - 7
    1 1 0 - 2, 4 - 7
    2 2 0 - 2, 4 - 7
    3 5 0 - 2, 4 - 7
    4 6 not used
    5 7 not used
    condition : 0/1/2
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i/21i, 0i Series 15
    6 0 - 3, 5 - 7, 9 - 13 0 - 2, 4 - 7, 9 - 11
    7 0 - 3, 5 - 7, 9 - 13 0 - 2, 4 - 7, 9 - 11
    8 not used 0 - 2, 4 - 7, 9 - 11
    9 not used 13
    10 not used 13
    11 not used 13
    * If "-1" is stored in ch[n].kind, the data of its channel is invalid.
    (The value of "kind" concerning an unused channel is indefinite.)
    * Select a following member of union properly according to the value of ch[n].kind.
    ch[n].u.axis kind : except '13'
    ch[n].u.io kind : '13'
    * In case of Series 16i/18i-W, there is not the value of ch[n].kind, 100,101,102.

    Kind of waveform data (O:available,X:not available)
    number meaning unit Series 16/18, 16i/18i/21i, 0i Series 15
    0/1/2 100/101/102 0/1/2 100/101/102
    -1 No data - O O O O
    0 Servo error(8msec) Pulse(detection unit) O O O O
    1 Number of servo pulses to be generated Pulse(detection unit) O O O O
    2 Servo torque %(max. current ratio) O O O O
    3 Servo error(2msec) Pulse(detection unit) O X X X
    4 Number of servo pulses after acceleration,deceleration Pulse(detection unit) X X O O
    5 Actual speed rpm O O X X
    Pulse(detection unit) X X O O
    6 Value of the electric current command for servo %(max. current ratio) O O O O
    7 Data during heat %(OVC alarm ratio) O O O O
    9 Composite speed for 1st,2nd,3rd axis Pulse(detection unit) O X X X
    Composite speed for all axes MM/MIN or RPM X X O X
    10 Spindle speed %(max. spin ratio) O X X X
    rpm X X O X
    11 Load meter for spindle %(max. output ratio) O X O X
    12 Difference of spindle conversion error Pulse(detection unit) O X X X
    13 on/off state of specified machine signal - O X O X

    ch[n].u.axis
    axis information of waveform data
    Specify the axis information of waveform data.
    It is valid when the kind of waveform data is expect '13'.
    0 invalidates the setting of its channel.

    Axis information are as follows.

  • Series 15
    • Each bit according to the kind of waveform data is as follows.
      Plural bits cannot be set.
      In case that condition is 0/1/2, channel number 6, 7 are valid.
      In case that condition is 100/101/102, channel number 0,..,3 are valid.
      Channel 0 and 1, channel 2 and 3 must be set the same. If not, channel 0 and 2 is valid.

      Maximum axis <= 15
      kind of waveform data
      0 - 7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 14 ON : 15th axis designation
      bit 15 : not used
      9
      bit 0 ON : first path designation
      bit 1 ON : second path designation(only 15TT)
      bit 2 - 15 : not used
      10 - 11
      bit 0 ON : first spindle designation
      bit 1 ON : second spindle designation
      bit 2 - 15 : not used

      Maximum axis = 24
      kind of waveform data
      0 - 7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 22 ON : 23rd axis designation
      bit 23 ON : 24th axis designation
      bit 24 - 31 : not used
      9
      bit 0 ON : first path designation
      bit 1 ON : second path designation(only 15TT)
      bit 2 - 31 : not used
      10 - 11
      bit 0 ON : first spindle designation
      bit 1 ON : second spindle designation
      bit 2 - 31 : not used

  • Series 16/18, 16i/18i/21i, 0i
    • Each bit according to channel number is as follows.

      channel 0 - 5
      The kind of waveform data
      0 - 3, 5 - 7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 7 ON : eighth axis designation
      bit 8 - 15 : not used
      * Plural axes cannot be set.

      channel 6, 7
      The kind of waveform data
      0 - 3, 5 - 7
      bit 0 ON : first axis designation
      bit 1 ON : second axis designation
         :
      bit 7 ON : eighth axis designation
      bit 8 - 15 : not used
      * Plural axes cannot be set.
      10 - 11
      bit0 ON : first spindle designation
      bit1 ON : second spindle designation
      bit2 ON : third spindle designation
      bit3 - 15 : not used
      * Plural spindles cannot be set.

    ch[n].u.io.adr
    Kind of PMC address of machine signal
    Specify the kind of PMC address which corresponds to machine signal to trace with ASCII code.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Kind of stored PMC address : "G","F","Y","X"
    NULL(0x00) invalidates the setting.

    ch[n].u.io.bit
    bit number of machine signal
    Specify the bit number of PMC address which corresponds to machine signal to trace.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Range of stored bit number : 0 - 7

    ch[n].u.io.no
    number of PMC address of machine signal
    Specify the PMC address number which corresponds to machine signal to trace.
    It is valid only when condition is 0/1/2 and the kind of waveform data is 13.
    Range of specified number is shown in pmc_rdpmcrng function reference.

    ERRORS

    Code Description
    EW_DATA data error
    In order to get more information for this err_no return value, execute cnc_getdtailerr function.
    The following detail status will be set onto the member, err_no of ODBERR structure.
    0 : Error except EW_DATA
    1 : Start condition(condition) error
    2 : Trigger condition(trg_adr) error
    3 : Trigger bit(trg_bit) error
    4 : Trigger number(trg_no) error
    5 : Delay time(delay) error
    6 : Sampling time(t_range) error
    7 : Kind of waveform data(ch[n].kind) error
    8 : Axis information of waveform data(ch[n].u.axis) error
    9 : Kind of PMC address of machine signal(ch[n].u.io.adr) error
    10 : Bit number of PMC address of machine signal(ch[n].u.io.bit) error
    11 : PMC address number of machine signal(ch[n].u.io.bit) error
    And the channel number(0 - 11) including incorrect data will be set onto the member, err_dtno of ODBERR.
    (In case that a date is not related to channel, -1 is set)
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error(Series 16/18, 16i/18i/21i, 0i)
    3112#0=0 when CNC is turned on.
    set 3112#0=1 and reboot.
    EW_REJECT CNC execution rejected
    The waveform diagnosis data is being sampled.

    wave\cnc_wrwaveprm2

    Writes the waveform diagnosis parameter.

    In case of using this function, the waveform diagnosis screen of CNC must not be used.
    If used, the behavior of this function is not guaranteed.


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrwaveprm2(unsigned short FlibHndl, IODBWVPRM *wave );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle.
    See "Library handle" for details.

    wave in

    Pointer to the IODBWVPRM structure including the waveform diagnosis parameter.
    The IODBWVPRM structure is as follows.

    typedef struct iodbwvprm {
        short   condition ; /* condition */
        char    trg_adr ;   /* trigger address */
        char    trg_bit ;   /* trigger bit */
        short   trg_no ;    /* trigger number */
        short   reserve1 ;
        long    delay ;     /* delay time */
        long    t_range ;   /* sampling time */
        struct {
            short   kind ;  /* kind of waveform data */
            union {
                long        axis ;  /* axis information */
                struct {            /* machine signal */
                    char    adr ;   /* kind of PMC address */
                    char    bit ;   /* bit number */
                    short   no ;    /* number of PMC address */
                } io ;
            } u ;
            long    reserve2 ;
        } ch[12] ;
    } IODBWVPRM ;
    
    condition
    data sampling condition
    One of the following condition is stored.
    0 : The sampling of the data is started by cnc_wavestart function, and stopped after the specified sampling time.
    1 to 20 : The sampling of the data is started when the trigger event occurs after calling cnc_wavestart function, and stopped after the specified sampling time.
    The trigger events are the followings.
    1 : Machine signal on
    2 : Machine signal off
    3 : Change of the machine signal state (only Series 15i)
    10 : Servo alarm (only Series 15i)
    11 : Servo alarm or machine signal on (only Series 15i)
    12 : Servo alarm or machine signal off (only Series 15i)
    13 : Servo alarm or change of the machine signal state (only Series 15i)
    20 : The trigger event is not specified. (only Series 15i)
    100 to 120 : The sampling of the data is started by cnc_wavestart function, and stopped when the trigger event occurs.
    The trigger events are the followings.
    100 : Servo alarm
    101 : Servo alarm or machine signal on
    102 : Servo alarm or machine signal off
    103 : Servo alarm or change of the machine signal state (only Series 15i)
    111 : Machine signal on (only Series 15i)
    112 : Machine signal off (only Series 15i)
    113 : Change of the machine signal state (only Series 15i)
    120 : The trigger event is not specified. (only Series 15i)
    * In case of Series 16/18, 0i, the waveform data under the condition 100,101,102 is backupped even if the power is off.

    trg_adr
    kind of PMC address of trigger machine signal
    The kind of PMC address which corresponds to machine signal for a trigger event is stored with ASCII code.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Kind of stored PMC address : "G","F","Y","X"
    When the machine signal for a trigger event is not be specified, NULL(0x00) is stored.

    trg_bit
    bit number of trigger machine signal
    The bit number of PMC address which corresponds to machine signal for a trigger event is stored.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Range of stored bit number : 0,..,7

    trg_no
    number of PMC address of trigger machine signal
    The PMC address number which corresponds to machine signal for a trigger event is stored.
    It is valid when condition is 1/2/3/11/12/13/101/102/103/111/112/113.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    delay
    delay time
    After the stop condition is satisfied and this delay time has passed, the sampling is stopped.
    range
    Series 15 0,..,32000
    Series 15i 0,..,160000
    Series 16/18, 16i/18i/21i, 0i 0,..,32760
    unit 1 msec
    It is valid when the condition is 100/101/102/103/111/112/113.

    t_range
    sampling time
    Sampling time is stored.
    range
    Series 15 25/50/100/200/400/800 show the following time respectively.
    500/1000/2000/4000/8000/16000
    Series 15i 10,..,80000
    Series 16/18, 16i/18i/21i, 0i 10,..,8192
    unit 1 msec
    It is valid on all conditions.

    ch[n].kind
    kind of waveform data (n is channel number 0,..,11)
    An available channel and the kind of the waveform data are as follows according to the CNC MODEL and the condition.
    channel No (n) ch[n].kind
    (kind of waveform data)
    Series 16/18, 16i/18i/21i, 0i Series 15 Series 15i
    0 0 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 1)
    1 1 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 2)
    2 2 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 3)
    3 5 (condition is 100/101/102) 0,..,2, 4,..,7 (condition is 100/101/102) 0,..,2, 4,..,7, 9,..,11 (wave 4)
    4 6 (condition is 100/101/102) not used not used
    5 7 (condition is 100/101/102) not used not used
    6 0,..,3, 5,..,7, 9,..,13 (condition is 0/1/2) 0,..,2, 4,..,7, 9,..,11 (condition is 0/1/2) not used
    7 0,..,3, 5,..,7, 9,..,13 (condition is 0/1/2) 0,..,2, 4,..,7, 9,..,11 (condition is 0/1/2) not used
    8 not used 13 (condition is 0/1/2) 13 (signel 1)
    9 not used 13 (condition is 0/1/2) 13 (signel 2)
    10 not used 13 (condition is 0/1/2) 13 (signel 3)
    11 not used 13 (condition is 0/1/2) 13 (signel 4)
      * If "-1" is stored in ch[n].kind, the data of its channel is invalid.
      (The value of "kind" concerning an unused channel is indefinite.)
      * Select a following member of union properly according to the value of ch[n].kind.
      ch[n].u.axis kind : except '13'
      ch[n].u.io kind : '13'

    Kind of waveform data (O:available,X:not available)
    number meaning unit Series 16/18, 16i/18i/21i, 0i Series 15 Series 15i
    0/1/2 100/101/102 0/1/2 100/101/102
    -1 No data - O O O O O
    0 Servo error(8msec) Pulse(detection unit) O O O O O
    1 Number of servo pulses to be generated Pulse(detection unit) O O O O O
    2 Servo torque %(max. current ratio) O O O O O
    3 Servo error(2msec) Pulse(detection unit) O X X X X
    4 Number of servo pulses after acceleration,deceleration Pulse(detection unit) X X O O O
    5 Actual speed RPM O O X X X
    Pulse(detection unit) X X O O O
    6 Value of the electric current command for servo %(max. current ratio) O O O O O
    7 Data during heat simulation %(OVC alarm ratio) O O O O O
    9 Composite speed for 1st,2nd,3rd axis Pulse(detection unit) O X X X X
    Composite speed for all axes MM/MIN,INCH/MIN or RPM X X O X O
    10 Spindle speed %(max. spin ratio) O X X X X
    RPM X X O X O
    11 Load meter for spindle %(max. output ratio) O X O X O
    12 Difference of spindle conversion error Pulse(detection unit) O X X X X
    13 on/off state of specified machine signal - O X O X O

    ch[n].u.axis
    axis information of waveform data
    Axis information of waveform data is stored.
    It is valid when the kind of waveform data is expect '13'.
    Axis information of Series 15/16/18, Series 15i/16i/18i/21i, 0i, are as follows.
  • Series 15
  • kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,2
    4,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 22 ON : 23rd axis designation
    bit 23 ON : 24th axis designation
    bit 24,..,31 : not used
    9
    bit 0 ON : first path designation
    bit 1 ON : second path designation(only 15TT)
    bit 2,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2,..,31 : not used

  • Series 15i
  • kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,2
    4,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 22 ON : 23rd axis designation
    bit 23 ON : 24th axis designation
    bit 24,..,31 : not used
    9
    bit 0 ON : first path designation
    bit 1 ON : second path designation
    (only existing second path)
    bit 2,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2 ON : third spindle designation
    bit 3 ON : fourth spindle designation
    bit 4,..,31 : not used

  • Series 16/18, 16i/18i/21i, 0i
  • channel The kind of waveform data value of ch[n].axis
    (axis information of waveform data)
    0,..,5 -
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 7 ON : eighth axis designation
    bit 8,..,31 : not used
    6, 7 0,..,3
    5,..,7
    bit 0 ON : first axis designation
    bit 1 ON : second axis designation
       :
    bit 7 ON : eighth axis designation
    bit 8,..,31 : not used
    10,..,11
    bit 0 ON : first spindle designation
    bit 1 ON : second spindle designation
    bit 2 ON : third spindle designation
    bit 3,..,31 : not used

    * n = maximum controlled axes

    ch[n].u.io.adr
    Kind of PMC address of machine signal
    The kind of PMC address which corresponds to machine signal to trace is stored with ASCII code.
    It is valid when the kind of waveform data is 13.
    Kind of stored PMC address : "G","F","Y","X"

    ch[n].u.io.bit
    bit number of machine signal
    The bit number of PMC address which corresponds to machine signal to trace is stored.
    It is valid when the kind of waveform data is 13.
    Range of stored bit number : 0,..,7

    ch[n].u.io.no
    number of PMC address of machine signal
    The PMC address number which corresponds to machine signal to trace is stored.
    It is valid when the kind of waveform data is 13.
    Range of stored number is shown in pmc_rdpmcrng function reference.

    ERRORS

    Code Description
    EW_DATA data error In order to get more information for this err_no(nErr_no) return value, execute cnc_getdtailerrfunction.
    The following detail status will be set onto the member, err_no of ODBERR structure (nErr_no of ODBERR user define type.).
    0 : Error except EW_DATA
    1 : Start condition (condition) error
    2 : Trigger condition (trg_adr) error
    3 : Trigger bit (trg_bit) error
    4 : Trigger number (trg_no) error
    5 : Delay time (delay) error
    6 : Sampling time (t_range) error
    7 : Kind of waveform data (ch[n].kind) error
    8 : Axis information of waveform data (ch[n].u.axis) error
    9 : Kind of PMC address of machine signal (ch[n].u.io.adr) error
    10 : Bit number of PMC address of machine signal (ch[n].u.io.bit) error
    11 : PMC address number of machine signal (ch[n].u.io.bit) error
    And the channel number (0 to 11) including incorrect data will be set onto the member, err_dtno of ODBERR.
    (In case that a date is not related to channel, -1 is set)
    EW_NOOPT No option
    The extended driver/library function is necessary.
    EW_PARAM CNC parameter error (only Series 16/18, 16i/18i/21i, 0i )
    3112#0=0 when CNC is turned on. Set 3112#0=1 and reboot.
    EW_REJECT CNC execution rejected (only Series 16/18, 16i/18i/21i, 0i )
    The waveform diagnosis data is being sampled.

    wire\cnc_rdmsptype

    Reads the measured point type data specified by "s_number", "e_number".
    The data is stored in "data" array of "IODBMSTP" with signed binary format.
    - Available range of data : 0,...,3


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_rdmsptype( unsigned short FlibHndl, short s_number, short e_number, short length, IODBMSTP *mspt );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    s_number in

    Specify the start number of the measured point.

    e_number in

    Specify the end number of the measured point.

    length in

    Specify the data block length(size of IODBMSTP structure).

    (6+(number of measured points))

    mspt out

    Pointer to the IODBMSTP structure including the measured point type data.

    The IODBMSTP structure is as follows.
    typedef struct iodbmstp {
            short datano_s; /* start number of measured point */
            short dummy;    /* (not used) */
            short datano_e; /* end number of measured point */
            char  data[N];  /* measured point type data */
    } IODBMSTP ;            /* N : number of measured points */
    

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBMSTP structure(length) is wrong.
    EW_NUMBER Data number error
    Measured point number(s_number, e_number) is wrong.

    wire\cnc_setvrtclpos

    Sets wire vertical position of axis specified with "axis".


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_setvrtclpos( unsigned short FlibHndl, short axis );


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    axis in

    Specify axis to set the wire virtical position.

    -1 : Axis U and V
    3 : Axis U
    4 : Axis V


    ERRORS

    Code Description
    EW_ATTRIB data attribute error
    The specification of axis is improper.
    EW_NOOPT no option
    The extended driver/library function is necessary.
    EW_REJECT CNC execution denied

    wire\cnc_wrmsptype

    Writes the measured point type data specified by "datano_s", "datano_e".
    The data must be stored in "data" array of "IODBMSTP" with signed binary format.
    - Available range of data : 0,...,3


    PROTOTYPE

    FWLIBAPI short WINAPI cnc_wrmsptype(unsigned short FlibHndl, short length, IODBMSTP *mspt);


    ARGUMENTS

    Name Direction Description
    FlibHndl in

    Specify the library handle. See "Library handle" for details.

    length in

    Specify the data block length(size of IODBMSTP structure).

    (6+(number of measured points))

    mspt out

    Pointer to the IODBMSTP structure including the measured point type data.

    The IODBMSTP structure is as follows.
    typedef struct iodbmstp {
            short datano_s; /* start number of measured point */
            short dummy;    /* (not used) */
            short datano_e; /* end number of measured point */
            char  data[N];  /* measured point type data */
    } IODBMSTP ;            /* N : number of measured points */
    
    datano_s
    Specify the start number of the measured point.
    datano_e
    Specify the end number of the measured point.

    ERRORS

    Code Description
    EW_LENGTH Data block length error
    Size of IODBMSTP structure(length) is wrong.
    EW_NUMBER Data number error
    Measured point number(datano_s, datano_e) is wrong.
    EW_DATA Data error
    Measured point type data(data) is out of range.